-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtax.c
36 lines (34 loc) · 790 Bytes
/
tax.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#include<stdio.h>
tax();
main()
{
tax();
}
tax()
{
double income, taxable_income,tax,MIN_INCOME1;
clrscr ();
printf("n Enter the income: ");
scanf ("%lf", &income) ;
taxable_income = income - 150000;
if(taxable_income <= 0)
{
printf("\n NO TAX");
}
else if((taxable_income >= MIN_INCOME1)&&(taxable_income < MAX_INCOME1))
{
tax = (taxable_income - MIN_INCOME1) *TAX_RATE1;
printf("%d",tax);
}
else if(taxable_income >= MIN_INCOME2 && taxable_income < MAX_INCOME2)
{
tax = (taxable_income - MIN_INCOME2) * TAX_RATE2;
}
else
{
tax = (taxable_income - MIN_INCOME3) * TAX_RATE3;
printf("\n TAX= %lf", tax);
}
getch();
return 0;
}