Respuesta :
Answer:
# include <iostream>
using namespace::std;
int main()
{ int hours;
float hourly_rate= 47;
double net_Sal;
float tax1;
float tax2;
float tax3;
float tax4;
float tax5;
double gross_Pay;
float bonus;
cout<<"Enter net hours worked";
cin>>hours;
net_Sal= 47 * 387;
tax1 = (4.7 * net_Sal)/100;
tax2= 87;
tax3=(3.7 * net_Sal)/100;
tax4=3;
tax5=(0.47 * net_Sal)/100;
gross_Pay= net_Sal- tax1 - tax2 -tax3 - tax4 - tax5;
float temp=gross_Pay;
double in_hand;
if (gross_Pay<10)
{
bonus= (5 * gross_Pay)/100;
in_hand=gross_Pay+bonus;
gross_Pay=gross_Pay-gross_Pay;
}
else if (gross_Pay>10 ||gross_Pay<500)
{ bonus= (10 * gross_Pay)/100;
temp=gross_Pay-gross_Pay;
in_hand=in_hand+bonus;
}
else if (gross_Pay>500|| gross_Pay<1000)
{ bonus= 500;
gross_Pay=gross_Pay-gross_Pay;
in_hand=in_hand+bonus;
}
else if (gross_Pay>1000 || gross_Pay<=2000)
{ bonus= 600;
gross_Pay=gross_Pay-gross_Pay;
in_hand=in_hand+bonus;
}
else if (gross_Pay>2000)
{ bonus= (5 * gross_Pay)/100;
gross_Pay=gross_Pay-gross_Pay;
in_hand=in_hand+bonus;
}
cout<<"in hand="<<in_hand;
return 0;
}
Explanation:
Please check the answer section. The only complex part of this question is number of variables, and if loop conditional statements.