-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathquestion5.java
More file actions
39 lines (35 loc) · 1013 Bytes
/
Copy pathquestion5.java
File metadata and controls
39 lines (35 loc) · 1013 Bytes
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
public static void main(String[] args)
{
double x=14999.99;
double tax;
if(0.00<=x && 14999.99>=x)
{
tax= 0.00 + ((x-0.00)*15/100);
System.out.println("Tax= " +tax);
}
else if (15000.00<=x && 29999.99>=x)
{
tax= 2250 + ((x-15000.00)*18/100);
System.out.println("Tax= "+tax);
}
else if(30000.00<=x && 49999.99>=x)
{
tax= 5400 + ((x-30000.00)*22/100);
System.out.println("Tax= "+tax);
}
else if(50000.00<=x && 79999.99>=x)
{
tax= 11000 + ((x-50000.00)*27/100);
System.out.println("Tax= "+tax);
}
else if(80000.00<=x && 150000.00>=x)
{
tax= 21600 + ((x-80000.00)*33/100);
System.out.println("Tax= "+tax);
}
else
{
System.out.println("-1.0");
}
}
}