- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathleapYear.java
More file actions
Latest commit
28 lines (27 loc) · 671 Bytes
/
Copy pathleapYear.java
File metadata and controls
28 lines (27 loc) · 671 Bytes
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
importjava.util.*;
publicclassleapYear
{
publicstaticvoidmain(Stringargs[])
{
intyear;
Scannersc=newScanner(System.in);
year=sc.nextInt();
if(year%4==0)
{
if(year%100==0)
{
if(year%400==0)
{
System.out.println("Its a Leap Year");
}
else
System.out.println("Its not a Leap Year");
}
else
{
System.out.println("Its a Leap Year");
}
}
elseSystem.out.println("Its not a Leap Year");
}
}