forked from bliblidotcom/training-java-future-program
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDays.java
More file actions
68 lines (64 loc) · 1.94 KB
/
Copy pathDays.java
File metadata and controls
68 lines (64 loc) · 1.94 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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
import java.util.Scanner;
public class Days {
public static void main(String[] args) {
scoring();
}
public static void scoring()
{
Scanner scan = new Scanner(System.in);
int year = scan.nextInt();
int month = scan.nextInt();
switch(month)
{
case 1:
System.out.println("This month days is 31");
break;
case 2:
String announcedayskabisat = "this month days is 29";
if(year%400 == 0)
{
System.out.println(announcedayskabisat);
}
else
{
if(year%4 == 0)
{
System.out.println(announcedayskabisat);
}
else
System.out.println("This month days is 28");
}
break;
case 3:
System.out.println("This month days is 31");
break;
case 4:
System.out.println("This month days is 30");
break;
case 5:
System.out.println("This month days is 31");
break;
case 6:
System.out.println("This month days is 30");
break;
case 7:
System.out.println("This month days is 31");
break;
case 8:
System.out.println("This month days is 30");
break;
case 9:
System.out.println("This month days is 31");
break;
case 10:
System.out.println("This month days is 31");
break;
case 11:
System.out.println("This month days is 31");
break;
case 12:
System.out.println("This month days is 31");
break;
}
}
}