-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathLeapYear.java
34 lines (30 loc) · 937 Bytes
/
LeapYear.java
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
public class LeapYear {
public static void main(String[] args) {
int year = 2024;
// if (year % 4 == 0) {
// if (year % 100 == 0) {
// if (year % 400 == 0) {
// System.out.println("Yes, leap year");
// } else {
// System.out.println("Not a leap year");
// }
// } else {
// System.out.println("Not a leap year");
// }
// } else {
// System.out.println("Not a leap year");
// }
boolean isStudent = true;
boolean isCr = true;
if (isStudent) {
if (isCr) {
System.out.println("This student is a CR");
} else {
System.out.println("This student is not a CR");
}
System.out.println("Yes it is student");
} else {
System.out.println("Not a student");
}
}
}