-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtax.java
More file actions
31 lines (27 loc) · 775 Bytes
/
tax.java
File metadata and controls
31 lines (27 loc) · 775 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
public class Main{
public static void main(String[]args){
double income;
income=34000.00;
double taxdue;
if(income>=0.00&&income<=14999.99)
{
taxdue=0.00+(income-0.00)*0.15;
System.out.println(taxdue);
}
else if(income>=15000.00&&income<=29999.99){
taxdue=2250.00+(income-15000.00)*0.18;
System.out.println(taxdue);}
else if(income>=30000.00&&income<=49999.99){
taxdue=5400.00+(income-30000.00)*0.22;
System.out.println(taxdue);}
else if(income>=50000.00&&income<=79999.99){
taxdue=11000.00+(income-50000.00)*0.27;
System.out.println(taxdue);}
else if(income>=80000.00&&income<=150000.00){
taxdue=21600.00+(income-80000.00)*0.33;
System.out.println(taxdue);
}
else
{ System.out.println("-1.0");}
}
}