-
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathswich3.java
More file actions
45 lines (37 loc) · 1.11 KB
/
swich3.java
File metadata and controls
45 lines (37 loc) · 1.11 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
package swichcase;
import org.jetbrains.annotations.NotNull;
import java.util.Scanner;
public class swich3 {
public static void main(String @NotNull [] args) {
oyfasl(4);
System.out.println(args.toString());
}
public static void oyfasl(int number) {
if (number > 0 && number <= 12) {
switch (number) {
case 12:
case 1:
case 2:
System.out.println(number + "- oy Qish");
break;
case 4:
case 5:
case 3:
System.out.println(number + "- oy Bahor");
break;
case 6:
case 7:
case 8:
System.out.println(number + "- oy Yoz");
break;
case 9:
case 10:
case 11:
System.out.println(number + "-oy Kuz");
break;
}
} else {
System.out.println("Buunday Oy raqamai Yo`q Oy raqami 1...12 gacha ");
}
}
}