-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathURI_1038.java
More file actions
38 lines (31 loc) · 758 Bytes
/
Copy pathURI_1038.java
File metadata and controls
38 lines (31 loc) · 758 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
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);
int X,Y;
double total ;
X = scanner.nextInt();
Y = scanner.nextInt();
if ( X == 1 ) {
total = ( Y*4);
System.out.printf("Total: R$ %.2f\n",total);
}
else if ( X==2 ) {
total = ( Y*4.50);
System.out.printf("Total: R$ %.2f\n",total);
}
else if ( X==3 ) {
total = ( Y*5.00);
System.out.printf("Total: R$ %.2f\n",total);
}
else if ( X==4 ) {
total = ( Y*2.00);
System.out.printf("Total: R$ %.2f\n",total);
}
else if ( X==5 ) {
total = ( Y*1.50);
System.out.printf("Total: R$ %.2f\n",total);
}
}
}