2020-04-21
2020-04-21 本文已影响0人
Infinite_lfp
1 public class LeapYear {
2 public static void main(String args[])
3 {
4 int year = 2016;
5 if ((year % 4 == 0 && year % 100 != 0) ||
6 (year % 400 == 0)){
7 System.out.println(year + " is a leap year.");
8 }
9 else{
10 System.out.println(year + " is not a leap year.");
11 }
12 }
13 }