-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathescolha.java
More file actions
30 lines (25 loc) · 862 Bytes
/
Copy pathescolha.java
File metadata and controls
30 lines (25 loc) · 862 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.util.Scanner;
public class escolha {
public static void main(String[] args){
Scanner enter = new Scanner(System.in);
int op;
float number = 0, result;
System.out.println("Type a number: ");
number = enter.nextFloat();
System.out.println("options: ");
System.out.println("1 to: 'Calculate the duble of the number'");
System.out.println("2 to: 'Calculate the triple of the number'");
System.out.println("Switch an option:");
op = enter.nextInt();
switch (op) {
case 1:
result = number * 2;
System.out.println("Duble: " + result);
break;
case 2:
result = number * 3;
System.out.println("Triple: " + result);
break;
}
}
}*/