-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathURI_1051.java
More file actions
30 lines (24 loc) · 735 Bytes
/
Copy pathURI_1051.java
File metadata and controls
30 lines (24 loc) · 735 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
import java.io.IOException;
import java.util.Scanner;
public class Main {
public static void main(String[] args) throws IOException {
Scanner scanner = new Scanner(System.in);
double salary = scanner.nextDouble();
if( salary>=0.00 && salary<=2000.00 )
{
System.out.printf("Isento\n");
}
else if( salary>=2000.01 && salary<=3000.00 )
{
System.out.printf("R$ %.2f\n",(salary-2000.00)*0.08);
}
else if( salary>=3000.01 && salary<=4500.00 )
{
System.out.printf("R$ %.2f\n",(salary-3000.00)*0.18 + (1000.00*0.08));
}
else
{
System.out.printf("R$ %.2f\n",(salary-4500.00)*0.28 + (1500.00*0.18) + (1000.00*0.08));
}
}
}