#include<stdio.h>
#include<conio.h>
void main()
{
clrscr();
char ch;
long int k,b,a;
do
{
printf("\nEnter the income to be calculate tax");
scanf("%ld",&a);
k=0;
if(a>5000)
{
k=k+0;
}
if(a>10000)
{
k=k+1000;
}
if(a>20000)
{
k=k+3000;
}
if(a > 35000)
{
b=a-35000;
b=b*20/100;
k+=b;
}
printf("\n The calculate tax is = %ld ",k);
printf("\n Do you want to continue(y/n)...");
ch=getche();
}while(ch=='y' || ch=='Y');
getch();
}
No comments:
Post a Comment
Please write your doubts