-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathEnterNoPrintMonth.java
More file actions
60 lines (60 loc) · 1.58 KB
/
Copy pathEnterNoPrintMonth.java
File metadata and controls
60 lines (60 loc) · 1.58 KB
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
56
57
58
59
60
import java.util.Scanner;
public class EnterNoPrintMonth{
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
System.out.println("Enter the Number:");
int month = sc.nextInt();
switch(month){
case 1: if(month==1){
System.out.println("Your Current Month is January.");
}
break;
case 2: if(month==2){
System.out.println("Your Current Month is February.");
}
break;
case 3: if(month==3){
System.out.println("Your Current Month is March.");
}
break;
case 4: if(month==4){
System.out.println("Your Current Month is April.");
}
break;
case 5: if(month==5){
System.out.println("Your Current Month is May.");
}
break;
case 6: if(month==6){
System.out.println("Your Current Month is June.");
}
break;
case 7: if(month==7){
System.out.println("Your Current Month is July.");
}
break;
case 8: if(month==8){
System.out.println("Your Current Month is August.");
}
break;
case 9: if(month==9){
System.out.println("Your Current Month is September.");
}
break;
case 10: if(month==10){
System.out.println("Your Current Month is October.");
}
break;
case 11: if(month==11){
System.out.println("Your Current Month is November.");
}
break;
case 12: if(month==12){
System.out.println("Your Current Month is December.");
}
break;
default :
System.out.println("Please Enter Number Between 1 to 12.");
}
}
}