Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Andrew lohr
- //Assignment 5
- #include<iostream>
- #include<string>
- #include<iomanip>
- using namespace std;
- int main()
- {
- string name;
- double gross;
- cout<<fixed<<showpoint<<setprecision(2);
- cout<<"Enter Employee Name.";
- getline(cin,name);
- cout<<"Enter Employee Gross Amount";
- cin>>gross;
- double ftax= (gross*.15),stax=(gross*.035),sst=(gross*.0575) ,mmt=(gross*.0275) ,pp=(gross*.05) ,hi=(75.00),
- netpay=gross-ftax-stax-sst-mmt-pp-hi;
- cout<<"\nGross Amount:........."<<internal<<setfill('.')<<setw(20)<<'$'<<gross
- <<"\nFederal Tax:.........."<<internal<<setfill('.')<<setw(20)<<'$'<<ftax
- <<"\nState Tax:............"<<internal<<setfill('.')<<setw(20)<<'$'<<stax
- <<"\nSocial Security Tax:.."<<internal<<setfill('.')<<setw(20)<<'$'<<sst
- <<"\nMedicare/Medicade Tax:"<<internal<<setfill('.')<<setw(20)<<'$'<<mmt
- <<"\nPension Plan:........."<<internal<<setfill('.')<<setw(20)<<'$'<<pp
- <<"\nHealth Insurance:....."<<internal<<setfill('.')<<setw(20)<<'$'<<hi
- <<"\nNet Pay:.............."<<internal<<setfill('.')<<setw(20)<<'$'<<netpay;
- system("pause>nul");
- }
- Enter Employee Name.Andrew Lohr
- Enter Employee Gross Amount3575
- Gross Amount:............................$3575.00
- Federal Tax:.............................$536.25
- State Tax:...............................$125.13
- Social Security Tax:.....................$205.56
- Medicare/Medicade Tax:...................$98.31
- Pension Plan:............................$178.75
- Health Insurance:........................$75.00
- Net Pay:.................................$2356.00
Add Comment
Please, Sign In to add comment