//Gleb Lerman
//CIS 3100
//Prof. William Hampton-Sosa
//Assignment #1
//Employee Paycheck Part #1
//Compiled 9/27/05


#include <iostream>
#include <string>

using namespace std;

int main()
{
	char employeeName[25];  //Array of character suitable for length of name
	float grossPay(0);		
	const double FEDIT(.15);//Taxes declaired and set
	const double STATETAX(.035);
	const double SSTAX(.0575);
	const double MEDIC(.0275);
	const double PENSION(.05);
	const double HEALTH(75);
	
	
	cout.setf(ios::fixed | ios::right);//display normal digits vs scientific notation
	cout.precision(2);	//set the # of digits to display after the decimal point
	cout<<"Please enter employee name"<<endl;
	cin.getline (employeeName, 25, '\n'); //get entire line and store in array employeeName with a max of 25 char
	cout<<"Please enter the gross pay amount"<<endl;
	cin>>grossPay;// get gross pay and store in var gross pay
	cout<<"\nName..........................   "<<employeeName<<endl;
	cout<<"Gross Earnings................$ "<<grossPay<<'\n'<<endl;
	cout<<"Federal Tax...................$ "<<grossPay*FEDIT<<endl;//calculate and display taxes
	cout<<"State Tax.....................$ "<<grossPay*STATETAX<<endl;
	cout<<"Social Security...............$ "<<grossPay*SSTAX<<endl;
	cout<<"Medicare/Medicaid Tax.........$ "<<grossPay*MEDIC<<endl;
	cout<<"Pension Plan..................$ "<<grossPay*PENSION<<endl;
	cout<<"Health Insurance..............$ "<<HEALTH<<endl;
	cout<<"Net pay.......................$ "<<grossPay-(grossPay*FEDIT)-(grossPay*STATETAX)
		-(grossPay*SSTAX)-(grossPay*MEDIC)-(grossPay*PENSION)-(HEALTH)<<'\n';//calculate and display net pay

return 0;
}//end main()
