Answer to Question #287852 in C++ for bazwalasim

Question #287852

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).


1
Expert's answer
2022-01-16T13:04:32-0500
#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;
	}
}

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 the first!

Leave a comment