-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmonth.java
More file actions
27 lines (24 loc) · 939 Bytes
/
month.java
File metadata and controls
27 lines (24 loc) · 939 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
import java.util.*;
public class month{
public static void main(String[] args) {
{
Scanner sc = new Scanner (System.in);
int month = sc.nextInt();
switch(month){
case 1 : System.out.println("january");
case 2 : System.out.println("feb");
case 3 : System.out.println("march");
case 4 : System.out.println("april");
case 5 : System.out.println("may");
case 6 : System.out.println("june");
case 7 : System.out.println("july");
case 8 : System.out.println("aug");
case 9 : System.out.println("sep");
case 10 : System.out.println("oct");
case 11: System.out.println("nov");
case 12: System.out.println("dec");
break;
default: System.out.println("invalid month");
}
}
}