66 834
Assignments Done
99,1%
Successfully Done
In October 2018

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.

Expert's answer
#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!

Comments

No comments. Be first!

Leave a comment

Ask Your question

Submit
Privacy policy Terms and Conditions