Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 759ed12

Browse files
author
Hud
committed
GITA MASALA
1 parent ba688fe commit 759ed12

File tree

4 files changed

+126
-7
lines changed

4 files changed

+126
-7
lines changed

‎.idea/inspectionProfiles/Project_Default.xml

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
745 Bytes
Binary file not shown.
534 Bytes
Binary file not shown.

‎src/swichcase/switch20.java

Lines changed: 118 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,128 @@
22

33
import java.util.Scanner;
44

5+
import static java.lang.System.in;
6+
import static java.lang.System.out;
7+
58
public class switch20 {
69
public static void main(String[] args) {
7-
Scanner scanner=new Scanner(System.in);
8-
System.out.println("Kunni kiriting:");
9-
int day=scanner.nextInt();
10-
System.out.println("Oyni kiriting: ");
11-
int month= scanner.nextInt();
12-
switch (day){
13-
case 12->{
10+
Scanner s = new Scanner(in);
11+
12+
out.println("Oy = ");
13+
int oy = s.nextInt();
14+
out.println("Kun = ");
15+
int kun = s.nextInt();
1416

17+
18+
switch (oy) {
19+
case 1 -> {
20+
if (kun >= 20 && oy >= 1 && oy <= 2) {
21+
out.println("Qovg'a");
22+
}else if (kun<=19&&oy==1){
23+
out.println("Echki");
24+
}
25+
else {
26+
out.println("1");
27+
}
28+
}
29+
case 2 -> {
30+
if (kun <= 18 && oy >= 1 && oy <= 2) {
31+
out.println("Qovg'a");
32+
} else if (oy <= 3 && oy >= 2&&kun>=19) {
33+
out.println("Baliq");
34+
} else {
35+
out.println("2");
36+
}
37+
}
38+
case 3 -> {
39+
if (kun <= 20 && oy >= 2 && oy <= 3) {
40+
out.println("Baliq");
41+
} else if (kun <= 21 && kun >= 19 && oy >= 3 && oy <= 4) {
42+
out.println("Qo'y");
43+
}
44+
}
45+
case 4 -> {
46+
if (kun <= 21 && kun >= 19 && oy >= 3 && oy <= 4) {
47+
out.println("Qo'y");
48+
} else if (oy <= 5 && oy >= 4 && kun >= 20) {
49+
out.println("Buzoq");
50+
} else {
51+
out.println("4");
52+
}
53+
}
54+
case 5 -> {
55+
if (oy <= 5 && oy >= 4 && kun <= 20) {
56+
out.println("Buzoq");
57+
} else if (oy <= 6 && oy >= 5 && kun >= 21) {
58+
out.println("Egizaklar");
59+
} else {
60+
out.println("5");
61+
}
62+
}
63+
case 6 -> {
64+
if (oy <= 6 && oy >= 5 && kun <= 21) {
65+
out.println("Egizaklar");
66+
} else if (oy <= 7 && oy >= 6 && kun >= 22) {
67+
out.println("Qisqichbaqa");
68+
} else {
69+
out.println("6");
70+
}
1571
}
72+
case 7 -> {
73+
if (oy <= 7 && oy >= 6 && kun <= 22) {
74+
out.println("Qisqichbaqa");
75+
} else if (oy <= 8 && oy >= 7 && kun >= 23) {
76+
out.println("Arslon");
77+
} else {
78+
out.println("7");
79+
}
80+
}
81+
case 8 -> {
82+
if (oy <= 8 && oy >= 7 && kun <= 22) {
83+
out.println("Arslon");
84+
} else if (oy <= 9 && oy >= 8 && kun >= 23) {
85+
out.println("Parizod");
86+
} else {
87+
out.println("8");
88+
}
89+
} case 9 -> {
90+
if (oy <= 10 && oy >= 9 && kun <= 22) {
91+
out.println("Parizod");
92+
} else if (oy <= 9 && oy >= 8 && kun >= 23) {
93+
out.println("Tarozi");
94+
} else {
95+
out.println("9");
96+
}
97+
}
98+
case 10 -> {
99+
if (oy <= 11 && oy >= 10 && kun <= 22) {
100+
out.println("Tarozi");
101+
} else if (oy <= 10 && oy >= 9 && kun >= 23) {
102+
out.println("Chayon");
103+
} else {
104+
out.println("10");
105+
}
106+
}case 11 -> {
107+
if (oy <= 11 && oy >= 10 && kun >= 23) {
108+
out.println("O`qotar");
109+
} else if (oy ==11 && kun <= 22) {
110+
out.println("Chayon");
111+
} else {
112+
out.println("11");
113+
}
114+
}
115+
case 12 -> {
116+
if (oy <= 12 && oy >= 11 && kun <= 21) {
117+
out.println("O'qotar");
118+
} else if (oy <= 12 && oy >= 11 && kun >= 22) {
119+
out.println("Echki");
120+
} else {
121+
out.println("12");
122+
}
123+
}
124+
125+
126+
16127
}
17128
}
18129
}

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /