C Program for income tax for
calculation.
Algorithm
Step 1: start
Step 2 : read income
Step 3 : if income <100000 display “no tax” other wise
goto step 4
Step 4 : if income < 200000 then tax = income – 100000
*0.1 go to step
Setp 5 : if income > 200000 then tax = tax=((income-100000)*0.2+(income-200000)*0.1)
go step
6
Step 6 : display tax
Step 7 : stop
Program
main()
{
int income,tax;
printf("enter the income");
scanf("%d",&income);
{
if(income<100000)
{
printf("no tax");
{
else
if(income<=200000)
{
tax=(income-100000)*0.1;
printf("tax is:%d",tax);
}
else
if(income>=200000)
{
tax=((income-100000)*0.2+(income-200000)*0.1);
printf("tax is:%d",tax);
}
}
printf("completed")
}
No comments:
Post a Comment