-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMenu.java
More file actions
35 lines (29 loc) · 880 Bytes
/
Copy pathMenu.java
File metadata and controls
35 lines (29 loc) · 880 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
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner obj=new Scanner(System.in);
System.out.println("Enter number 1-5");
int UserInput = obj.nextInt();
for(int i=0; i < UserInput; i++)
switch(UserInput)
{
case 1:
System.out.println("1 is Circle");
break;
case 2:
System.out.println("2 is Sqaure");
break;
case 3:
System.out.println("3 Rectangle");
break;
case 4:
System.out.println("4 Triangle ");
break;
case 5:
System.out.println("5 Exit");
break;
default:
System.out.println("Not valid");
}
}
}