-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathUri1134.java
More file actions
32 lines (29 loc) · 851 Bytes
/
Uri1134.java
File metadata and controls
32 lines (29 loc) · 851 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
import java.util.Scanner;
class Main{
public static void main(String[] args){
Scanner teclado = new Scanner(System.in);
int inputSenha = 0, al = 0, gas = 0, di = 0;
while(inputSenha != 4){
inputSenha = teclado.nextInt();
switch(inputSenha){
case 1:
al++;
break;
case 2:
gas++;
break;
case 3:
di++;
break;
case 4:
break;
default:
break;
}
}
System.out.println("MUITO OBRIGADO");
System.out.println("Alcool: " + al);
System.out.println("Gasolina: " + gas);
System.out.println("Diesel: " + di);
}
}