Sep 23, 2012 at 9:46pm UTC
Hello,
I am working on a program that gets users input for gross amount, I am suppose to have it take deductions such state tax 3.5, federal 5.7% and so forth how would i get it to do this and show appropriate answer?
Thanks
Sep 23, 2012 at 10:03pm UTC
It would be helpful if you start, then when you are stuck, we come in.
BTW, if you want a code to fulfil your goal, just post "I want the code".
Sep 23, 2012 at 10:07pm UTC
I have started the code, I am stuck at the part where I have to the calculations.
/* Author's Name, Mendoza Eduardo
· Program Name, Eduardo_Assign3.cpp
· Date, 9/22/2012
· College Name, Long Beach City College (LBCC)
*/
#include <iostream>
#include <string>
#include <iomanip>
#include <fstream>
#include <cmath>
using namespace std;
int main()
{
string fname = string();
string lname = string();
double gross=double();
double federaltax=double();// 15%
double statetax=double();//3.5%
double social=double();//5.75%
double medi=double();//2.75%
double pension=double();//5%
double health=double();//$75.00
cout<<"Enter name:";
cin>>fname>>lname;
cout<<"Enter Gross pay:";
setfill('.');
cout << right << setw(30);
cin>>gross;
cout<<"Federal Income Tax: 15%"<<endl;
cout << right << setw(30);
cout<<"State Tax: 3.5%"<<endl;
cout << right << setw(30);
cout<<"Social Securtiy Tax: 5.75%"<<endl;
cout << right << setw(30);
cout<<"Medicare/Medicaid Tax: 2.75%"<<endl;
system("pause");
}