IF anyone can give me a little more assistance I would be very greatful.
I am working on this program for my C++ class and here is how it goes.
Write a program that calculates and prints the monthly paycheck for an employee. The net pay is calculated after taking the following deductions.
Federal Tax 15%
State Tax 3.5%
Social Securtiy Tax 5.75%
Health Ins $75.00
Your program shoud prompt user for input of employee name, and gross amount. The output will be stored into a file. format your output to have two decimal perscion.
As for when I run the program I type in the Employee name when prompted for name and then it prompts for Gross amount but doesnt wait for an answer.
Here is what I have so far:
double federal, state, ss, med, pension, health, net;
cout << "What is the Employees Name " << endl;
cin >> employee;
cout << "What is the Employees Gross Pay " << endl;
cin >> gross;
federal = (gross * .15);
fout << "Federal Tax" << federal << endl;
state = (gross * .035);
fout << "State Tax" << state << endl;
ss = (gross * .0575);
fout << "Social Security Tax" << ss << endl;
med = (gross * .0275);
fout << "Medicare/Medicaid Tax" << med << endl;
pension = (gross * .05);
fout << "Pension Plan" << pension << endl;
health = 75.00;
fout << " Health Insurance" << health << endl;
net = (gross - (federal + state + ss + med + pension + health));
fout << "Net Pay" << net << endl;
Not sure if I am on the write track but any help would be greatly appreciated.