You are an accountant setting up a payroll system based on Table, which shows five different ranges for salaries up to Rs.150, 000.00. Each table line shows the base tax amount (column2) and tax percentage (column3) for a particular salary range (column1).
#include<iostream>
using namespace std;
int main ()
{
int salary,gross,hra,da;
cout<<"enter the basic salary of the employee."<<endl;
cin>>salary;
if(salary<= 10000)
{
da=salary*20/100;
hra=salary*80/100;
gross=salary+da+hra;
cout<<"the gross salary of the employee is"<<endl<<gross;
}
if(salary<= 20000)
{
da=salary*25/100;
hra=salary*90/100;
gross=salary+da+hra;
cout<<"the gross salary of employee is"<<endl<<gross;
}
else if(salary>20000)
{
da=salary*30/100;
hra=salary*95/100;
gross=salary+da+hra;
cout<<"the gross salary of employee is"<<endl<<gross;
}
else
{
cout<<"you have no salary"<<endl;
}
}
Comments
Leave a comment