Answer:
# include <iostream>
using namespace::std;
int main()
{ int hrs;
float hrly_rate= 47;
double net_Sl;
float t1;
float t2;
float t3;
float t4;
float t5;
double grss_Pay;
float bons;
cout<<"Enter number of hours worked";
cin>>hrs;
net_Sl= 47 * 387;
t1 = (4.7 * net_Sl)/100;
t2= 87;
t3=(3.7 * net_Sl)/100;
t4=3;
t5=(0.47 * net_Sl)/100;
grss_Pay= net_Sl- t1 - t2 -t3 - t4 - t5;
float tmp=grss_Pay;
double in_hnd;
if (grss_Pay<10)
{
bons= (5 * grss_Pay)/100;
in_hnd=grss_Pay+bons;
grss_Pay=grss_Pay-grss_Pay;
}
else if (grss_Pay>10 ||grss_Pay<500)
{ bons= (10 * grss_Pay)/100;
tmp=grss_Pay-grss_Pay;
in_hnd=in_hnd+bons;
}
else if (grss_Pay>500|| grss_Pay<1000)
{ bons= 500;
grss_Pay=grss_Pay-grss_Pay;
in_hnd=in_hnd+bons;
}
else if (grss_Pay>1000 || grss_Pay<=2000)
{ bons= 600;
grss_Pay=grss_Pay-grss_Pay;
in_hnd=in_hnd+bons;
}
else if (grss_Pay>2000)
{ bons= (5 * grss_Pay)/100;
grss_Pay=grss_Pay-grss_Pay;
in_hnd=in_hnd+bons;
}
cout<<"Final Salary"<<in_hnd;
return 0;
}
Explanation:
Please check the answer section.