- Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathExample9.java
22 lines (17 loc) · 598 Bytes
/
Example9.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
importjava.util.Scanner;
publicclassExample9 {
// 1..12 oraliqda oy tartibi berilgan
// 31 kunlik oylarni aniqlansin
// 6 -> ? 30 kunlik
// 7 -> ? 31 kunlik
// 8 -> ? 31 kunlik
// 2 -> ? 29 kunlik
publicstaticvoidmain(String[] args) {
Scannerscanner = newScanner(System.in);
intmonth = scanner.nextInt();
if (month == 1 || month == 3 || month == 5 || month == 7 || month == 8 ||
month == 10 || month == 12)
System.out.println("31 kunlik");
elseif(month == 4) System.out.println("30 l");
}
}