Searching...

Calculate the Bonus and get Net Salary.

15:50


#include<iostream>
using namespace std;
int main()
{
double salary,convince_allownce,house_rent,net_salary;
house_rent=0;
convince_allownce=0;
cout << "Please Enter Your Salary: ";
cin >> salary;
if (salary > 15000)
{
house_rent=(salary/100)*50;
convince_allownce=(salary/100)*15;
}
else if (salary > 10000)
{
house_rent=(salary/100)*30;
convince_allownce=(salary/100)*10;
}
else if (salary > 8000)
{
house_rent=(salary/100)*15;
convince_allownce=(salary/100)*5;
}
else
{
cout << "No Bonus!!!!!"<<endl;

}
net_salary= convince_allownce + house_rent + salary;
cout << "Your Convince allownce is: " << convince_allownce <<endl;
cout << "Your House Allownce is: " << house_rent <<endl;
cout << "Your Net Salary is: " << net_salary <<endl;
return 0;
}

0 comments:

Post a Comment

Thanks For Your FeedBack....