-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdays.java
More file actions
25 lines (18 loc) · 862 Bytes
/
days.java
File metadata and controls
25 lines (18 loc) · 862 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
import java.util.Scanner;
public class days {
//write the code in java program to run the week days in java
public static void main(String[] args){
Scanner input = new Scanner(System.in);
System.out.println("enter the number of the week day");
System.out.println("1- monday , 2- tuesday, 3- wednesday, 4- thursday , 5 friday , 6- saturday");
int day = input.nextInt();
switch (day) {
case 1->System.out.println("monday");
case 2->System.out.println("tuesday");
case 3->System.out.println("wednesday");
case 4->System.out.println("thursday");
case 5->System.out.println("friday");
case 6->System.out.println("saturday");
}
}
}