Answer:
1. Number of regular working hours
2. Number of overtime working hours
3. Numbers of dependents.
Step-by-step explanation:
Program :
#include <iostream>
using namespace std;
int main()
{
float x1,x2,x,s,f,i,t;
int d,d1;
cout << "Enter number of regular working hours " << endl;
cin >> x1;
cout << "Enter number of overtime working hours " << endl;
cin >> x2;
cout << "Enter number of dependents " << endl;
cin >> d;
x1=16.78*x1;
x2=25.17*x2;
x=x1+x2;
cout << "Workers Gross pay : $"<<x << endl;
s=(6*x)/100;
f=(14*x)/100;
i=(5*x)/100;
d1=0;
if(d>=3)
d1=35;
t=x-s-f-i-d1-10;
cout << "Social Security Tax : $"<<s << endl;
cout << "Federal Income Tax : $"<<f << endl;
cout << "State Income Tax : $"<<s << endl;
cout << "Union Dues : $10"<< endl;
cout << "Extra cost of health Insurance : $"<<d1 << endl;
cout << "Net Take Home : $"<<t << endl;
return 0;
}
Output :
Test case 1:
Enter number of regular working hours 20
Enter number of overtime working hours 0
Enter number of dependents 2
Workers Gross pay: $335.6
Social Security Tax : $20.136
Federal Income Tax : $46.984
State Income Tax : $20.136
Union Dues : $10
Extra cost of health Insurance : $0
Net Take Home : $241.7
Test case 2
Enter number of regular working hours 10
Enter number of overtime working hours 5
Enter number of dependents 3
Workers Gross pay : $293.65
Social Security Tax : $17.619
Federal Income Tax : $41.111
State Income Tax : $17.619
Union Dues : $10
Extra cost of health Insurance : $35
Net Take Home : $175.238