-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathamount.c
More file actions
47 lines (47 loc) · 1.03 KB
/
Copy pathamount.c
File metadata and controls
47 lines (47 loc) · 1.03 KB
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
37
38
39
40
41
42
43
44
45
46
47
#include<stdio.h>
int main()
{
int tcomp,tresp,disccomp,discresp;
float tax;
printf("Enter number of commercial plots\n");
scanf("%d",&tcomp);
printf("Enter number of residential plots\n");
scanf("%d",&tresp);
if(tcomp>5)
{
disccomp=tcomp-5;
tcomp=5;
printf("Your discarded plots are %d\n",disccomp);
}
if(tresp>5)
{
discresp=tresp-5;
tresp=5;
printf("Your discarded plots are %d\n",discresp);
}
int tplots=tcomp+tresp;
float plotcost=tplots*175000;
float comland=tcomp*3.0;
float resland=tresp*5.0;
float tland=comland+resland;
printf("Your total cost is %f\n",plotcost);
printf("Your land is %f\n",tland);
if(tland>0 && tland<=3)
{
tax=tland*1500;
}
else if(tland>3 && tland<=5.5)
{
tax=tland*1000;
}
else if(tland>5.5 && tland<=8.0)
{
tax=tland*750;
}
else
{
tax=tland*500;
}
printf("Your total tax on land is %f\n",tax);
return 0;
}