-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathexerc_4.java
37 lines (26 loc) · 890 Bytes
/
exerc_4.java
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
import java.util.Scanner;
public class exerc_4{
/* In this exercise we are working with de Switch Statement*/
public static void main (String args[]){
Scanner entrada = new Scanner(System.in);
//---------------Variables DEclaration--------------
int age;
//--------------Data imput--------------------------
System.out.println("Enter an integrer: ");
age = entrada.nextInt();
//---------------Data processing--------------------
switch(age){
case 1:
System.out.println("You can fly");
break;
case 2:
System.out.println("You can talk");
break;
case 3:
System.out.println("You can get trouble");
break;
default:
System.out.println("I don't know how old you are");
}
}
}