Answer:
#include<iostream> //i/o library
using namespace std;
int main(){
double hourlyRate = 0;
char paycheckPeriod='a';
while(paycheckPeriod<'A' || paycheckPeriod>'Z'){
cout<<"Enter paycheck period(A-Z): ";
cin>>paycheckPeriod;
}
while(hourlyRate<18 || hourlyRate>36){
cout<<"Enter hourly rate (18-36): ";
cin>>hourlyRate;
}
int hours = 0;
while(hours < 60 || hours > 120){
cout<<"Enter number of hours (60-120): ";
cin>>hours;
}
double grossPay = hourlyRate*hours;
cout<<"Gross Pay: "<<grossPay<<endl;
cout<<"federal tax: "<<0.15*grossPay<<endl;
cout<<"FICA tax: "<<0.0765*grossPay<<endl;
cout<<"state tax: "<<0.0435*grossPay<<endl;
cout<<"Net pay: "<<grossPay-(grossPay*(0.15+0.0765+0.0435));
return 0; //This makes sure that the program terminates
}
Attached is the output