-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathExample9.java
55 lines (52 loc) · 1.17 KB
/
Example9.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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
import java.util.Scanner;
public class Example9 {
private static Scanner scan;
public static void main(String[] args)
{
System.out.println("ENTER MONTH NUMBER");
scan = new Scanner(System.in);
int i = scan.nextInt();
System.out.println("");
switch(i)
{
case 1 :
System.out.println("JAN");
break;
case 2 :
System.out.println("FEB");
break;
case 3 :
System.out.println("MAR");
break;
case 4 :
System.out.println("APR");
break;
case 5 :
System.out.println("MAY");
break;
case 6 :
System.out.println("JUN");
break;
case 7 :
System.out.println("JUL");
break;
case 8 :
System.out.println("AUG");
break;
case 9 :
System.out.println("SEP");
break;
case 10 :
System.out.println("OCT");
break;
case 11 :
System.out.println("NOV");
break;
case 12 :
System.out.println("DEC");
break;
default :
System.out.println("INVALID MONTH NUMBER");
}
}
}