Write a program that takes the income of an employee and calculates the corresponding net income and tax portion based on the following information: (in C++)
tax = 40%: income > =100,000 $
tax=30%: 80K<=income<100K
tax=20%: 60K<=income<80K
tax=10%: 40K<=income<60K
tax = 0%: income <40 K
In case of any queries,please comment. I would be very happy to assist all your queries.Please give a Thumps up if you like the answer.
Program
#include <iostream>
using namespace std;
int main()
{
float income,tax,net_income;
cout<<"Enter income of employee : $";
cin>>income;
if(income>=100000)
tax=.4*income;
//tax = 40%: income > =100,000 $
else if (income>=80000 &&
income<100000)
tax=.3*income;
//tax=30%: 80K<=income<100K
else if (income>=60000 &&
income<80000)
tax=.2*income;
//tax=20%: 60K<=income<80K
else if (income>=40000 &&
income<60000)
tax=.1*income;
//tax=10%: 40K<=income<60K
else
tax=0;
//tax = 0%: income <40
K
net_income=income-tax;
cout<<"Income =
$"<<income<<endl;
cout<<"Tax = $"<<tax<<endl;
cout<<"Net Income =
$"<<net_income<<endl;
return 0;
}
Output
Enter income of employee : $45600
Income = $45600
Tax = $4560
Net Income = $41040
Screenshot
Get Answers For Free
Most questions answered within 1 hours.