5.incomeTax
#include <stdio.h>
int main()
{
int income;
int tax=0;
printf("Enter your income :\n");
scanf("%d", &income);
if(income>=250000 && income<=500000)
tax=tax+0.05*(income-250000);
if(income>=500000 && income<=1000000)
tax=tax+0.20*(income-250000);
if(income>=1000000 )
tax=tax+0.30*(income-250000);
printf("The tax you have to pay is :%d",tax);
/* tax = (income - 250000);
if (income <= 250000)
printf("No tax :\n");
else if (income > 250000 && income <= 500000)
printf("You have to pay tax %d:",(tax*5/100));
else if (income > 500000 && income <= 1000000)
printf("You have to pay tax %d:",(tax*20/100));
else if (income > 1000000)
printf("You have to pay tax %d:",(tax*30/100));*/
return 0;
}
Comments
Post a Comment