package com.qfedu.sex;
/**
* 编写程序,判断给定的某个年份是否是闰年。
* 闰年的判断规则如下:
* 若某个年份能被4整除但不能被100整除,则是闰年。
* 若某个年份能被400整除,则也是闰年。
*/
import java.util.Scanner;
public class four {
public static void main(String[]args) {
Scanner input = new Scanner(System.in);
System.out.println("请输入年数");
int year=input.nextInt();
if((year % 4 == 0 && year%100!=0)||(year % 400==0 )) {
System.out.println("闰年");
}else {
System.out.println("不是闰年");
}
}
}