107 325
Assignments Done
98.9%
Successfully Done
In March 2023

# Answer to Question #15639 in C++ for iram

Question #15639
:write a c program to calculate gross salary of an employes based on following
basic salary DA HRA
0-12000 35% 10%
12001-20000 47% 15% of salary excess of 12000
20001-25000 54% 17% of salary excess of 20000
25001& above 59% 19% of salary excess of 25000
CCA of RS 500 is applied to all the employse.
1
2012-10-02T07:18:31-0400
#include <iostream>
using namespace std;

int main()
{
float b;
cout<<"Enter basic salary:& ";
cin>>b;
if(b<12000){
cout<<"DA: "<<b*0.35<<" HRA: "<<b*0.10<<"\n";
cout<<"gross salary: "<<b*1.45<<"\n";
}
else if(b>12000 && b<20000){
cout<<"DA: "<<b*0.47<<" HRA: "<<b*0.15<<"\n";
cout<<"gross salary: "<<b*1.63<<"\n";

& }
else if(b<25000 && b>20000){
cout<<"DA: "<<b*0.54<<" HRA: "<<b*0.17<<"\n";
cout<<"gross salary: "<<b*1.71<<"\n";

& }
& else if(b>25000){
cout<<"DA: "<<b*0.59<<" HRA: "<<b*0.19<<"\n";
cout<<"gross salary: "<<b*1.78<<"\n";

& }
system("PAUSE");
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!