import java.util.Scanner;//导入Scanner类
public class text {
public static void main(String[] args)
{
System.out.println("本程序是用来判断是否为闰年");
Scanner sc=new Scanner(System.in);
System.out.println("请输入年份");
int age=sc.nextInt();
if((age % 100 != 0 && age % 4 == 0)|| age % 400 ==0) {
System.out.println(age+"是闰年");
}
else {
System.out.println(age+"是平年");
}
}
}
03-24
09-22
426
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
06-04
1933
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
04-07