#include<iostream.h>
#include<conio.h>
void main()
{
clrscr();
float a,b;
int xy;
cout<<"1.If monthly salary is > 9000\n";
cout<<"2.If monthly salary is in between 7500-8999\n";
cout<<"3.If monthly salary is <=7499\n";
cout<<"enter your salary category\n";
cin>>xy;
switch(xy)
{
case 1:
cout<<"enter your monthly salary\n";
cin>>a;
b=a*40*0.01;
cout<<"the income tax to be pay will be\n"<<b;
break;
case 2:
cout<<"enter your monthly salary\n";
cin>>a;
b=a*30*0.01;
cout<<"the income tax to be pay will be\n"<<b;
break;
case 3:
cout<<"enter your monthly salary\n";
cin>>a;
b=a*20*0.01;
cout<<"the income tax to be pay will be\n"<<b;
break;
default:
cout<<"the entered category is invalid";
break;
}
getch();
}
#include<conio.h>
void main()
{
clrscr();
float a,b;
int xy;
cout<<"1.If monthly salary is > 9000\n";
cout<<"2.If monthly salary is in between 7500-8999\n";
cout<<"3.If monthly salary is <=7499\n";
cout<<"enter your salary category\n";
cin>>xy;
switch(xy)
{
case 1:
cout<<"enter your monthly salary\n";
cin>>a;
b=a*40*0.01;
cout<<"the income tax to be pay will be\n"<<b;
break;
case 2:
cout<<"enter your monthly salary\n";
cin>>a;
b=a*30*0.01;
cout<<"the income tax to be pay will be\n"<<b;
break;
case 3:
cout<<"enter your monthly salary\n";
cin>>a;
b=a*20*0.01;
cout<<"the income tax to be pay will be\n"<<b;
break;
default:
cout<<"the entered category is invalid";
break;
}
getch();
}
No comments:
Post a Comment