Write a program that asks the user to enter salary and tax of 7%
and show the deducted amount after tax paid. Either he is supervisor, superintendent or worker ???
#include <iostream>
using namespace std;
int main() {
double salary,tax,deducted_amount;
cout<<"salary of employee = "<<endl;
cin>>salary;
tax = (7*salary)/100;
deducted_amount = salary-tax;
cout<<"salary after paid tax = "<<deducted_amount<<endl;
if(salary==40000)
cout<<"the employee is supervisor"<<endl;
else if(salary==20000)
cout<<"the employee is supritendent"<<endl;
else if(salary==10000)
cout<<"the employee is worker"<<endl;
return 0;
}
and show the deducted amount after tax paid. Either he is supervisor, superintendent or worker ???
#include <iostream>
using namespace std;
int main() {
double salary,tax,deducted_amount;
cout<<"salary of employee = "<<endl;
cin>>salary;
tax = (7*salary)/100;
deducted_amount = salary-tax;
cout<<"salary after paid tax = "<<deducted_amount<<endl;
if(salary==40000)
cout<<"the employee is supervisor"<<endl;
else if(salary==20000)
cout<<"the employee is supritendent"<<endl;
else if(salary==10000)
cout<<"the employee is worker"<<endl;
return 0;
}
No comments:
Post a Comment