//program to calculate tax...
#include<iostream.h>
using namespace std;
main()
{
double float salary; double float tax;
cout<<"enter your saliry";
cin>>salary;
if(salary>100000)
{
cout<<"you entered your wrong salary";
return;
}
{ if(salary<=30000)
{
tax=(1.0/100.0)*salary;
cout<<"your tax is ="<<tax;
}
if(salary>30000&&salary<=40000 )
{
tax=( 2.0/ 100.0)*salary;
cout<<"your tax is ="<<tax;
}
else if(salary>40000&&salary<=50000 )
{
tax=(3.0/100.0)*salary;
cout<<"your tax is ="<<tax;}
else if(salary>50000&&salary<=60000 )
{
tax=(4.0/100.0)*salary;
cout<<"your tax is ="<<tax;}
else if(salary>60000&&salary<=70000 )
{
tax=(5.0/100.0)*salary;
cout<<"your tax is ="<<tax;}
else if(salary>70000&&salary<=80000 )
{
tax=(6.0/100.0)*salary;
cout<<"your tax is ="<<tax;
}
else if(salary>80000&&salary<=90000 )
{
tax=(7.0/100.0)*salary;
cout<<"your tax is ="<<tax;
}
else if(salary>90000&&salary<=10000 0)
{
tax=(1.0/2.0)*salary;
cout<<"your tax is ="<<tax;
} }
system("pause");
}
#include<iostream.h>
using namespace std;
main()
{
double float salary; double float tax;
cout<<"enter your saliry";
cin>>salary;
if(salary>100000)
{
cout<<"you entered your wrong salary";
return;
}
{ if(salary<=30000)
{
tax=(1.0/100.0)*salary;
cout<<"your tax is ="<<tax;
}
if(salary>30000&&salary<=40000
{
tax=( 2.0/ 100.0)*salary;
cout<<"your tax is ="<<tax;
}
else if(salary>40000&&salary<=50000
{
tax=(3.0/100.0)*salary;
cout<<"your tax is ="<<tax;}
else if(salary>50000&&salary<=60000
{
tax=(4.0/100.0)*salary;
cout<<"your tax is ="<<tax;}
else if(salary>60000&&salary<=70000
{
tax=(5.0/100.0)*salary;
cout<<"your tax is ="<<tax;}
else if(salary>70000&&salary<=80000
{
tax=(6.0/100.0)*salary;
cout<<"your tax is ="<<tax;
}
else if(salary>80000&&salary<=90000
{
tax=(7.0/100.0)*salary;
cout<<"your tax is ="<<tax;
}
else if(salary>90000&&salary<=10000
{
tax=(1.0/2.0)*salary;
cout<<"your tax is ="<<tax;
} }
system("pause");
}
No comments:
Post a Comment