-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathday.java
More file actions
33 lines (31 loc) · 852 Bytes
/
day.java
File metadata and controls
33 lines (31 loc) · 852 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
import java.util.*;
public class day {
public static void main(String[] args) {
System.out.print("Enter the day number : ");
Scanner sc = new Scanner(System.in);
int day = sc.nextInt();
System.out.println();
if (day == 1) {
System.out.println("Monday");
}
else if (day == 2) {
System.out.println("Tuesday");
}
else if (day == 3) {
System.out.println("Wednesday");
}
else if (day == 4) {
System.out.println("Thursday");
}
else if (day == 5) {
System.out.println("Friday");
}
else if (day == 6) {
System.out.println("Saturday");
}
else {
System.out.println("Sunday");
}
System.out.println();
}
}