1. Write a program which calculate the employee meal allowance, medical allowance, house rent allowance and calculate the gross salary.
35% meal allowance.
10% medical allowance.
55% house rent allowance.
#include <iostream>
using namespace std;
int main(){
float amount;
cout<<"Enter amount: ";
cin>>amount;
float meal=amount*0.35;
float medical=amount*0.1;
float houseRent=amount*0.55;
float grossSalary=meal+medical+houseRent+amount;
cout<<"35% meal allowance: "<<meal<<"\n";
cout<<"10% medical allowance: "<<medical<<"\n";
cout<<"55% house rent allowance: "<<houseRent<<"\n";
cout<<"The gross salary: "<<grossSalary<<"\n";
cin>>meal;
return 0;
}
Comments
Leave a comment