-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDays.java
More file actions
34 lines (33 loc) · 835 Bytes
/
Days.java
File metadata and controls
34 lines (33 loc) · 835 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
import java.util.Scanner;
public class Days {
public static void main(String[] args) {
int day;
Scanner sc = new Scanner(System.in);
System.out.print("Enter An Integer(1-7): ");
day = sc.nextInt();
System.out.print("The Corresponding Day is " );
switch (day) {
case 1:
System.out.print("Monday");
break;
case 2:
System.out.print("Tuesday");
break;
case 3:
System.out.print("Wednesday");
break;
case 4:
System.out.print("Thursday");
break;
case 5:
System.out.print("Friday");
break;
case 6:
System.out.print("Saturday");
break;
case 7:
System.out.print("Sunday");
break;
}
}
}