public class LeapYears {
publicstatic void main (String[ ] args) {
Scannerinput = new Scanner (System.in);
System.out.println("输入年份: ");
int year =input.nextInt ();
if (year % 4== 0 && year % 100 != 0 || year % 400 == 0) { //输出某年是闰年
System.out.println(year + "年是闰年");
} else { //输出某年是平年
System.out.println(year + "年是平年");
}
}
}