We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e84ada1 commit be0dffbCopy full SHA for be0dffb
simple switch algoritham
@@ -0,0 +1,38 @@
1
+import java.util.Scanner;
2
+
3
+public class test1 {
4
+ public static void main(String[] args)
5
+ {
6
+ while(true)
7
8
+ int x;
9
10
+ System.out.println("enter the number between 1 to 4");
11
+ Scanner sc=new Scanner(System.in);
12
+ x=sc.nextInt();
13
14
15
+ switch (x)
16
17
+ case 1:
18
+ System.out.println("sunday");
19
+ break;
20
+ case 2:
21
+ System.out.println("monday");
22
23
+ case 3:
24
+ System.out.println("tuseday");
25
26
+ case 4:
27
+ System.out.println("wensday");
28
29
+ default:
30
+ System.exit(0);
31
32
33
+ }
34
35
36
37
38
+}
0 commit comments