package cn;
import java.util.Scanner;
public class Run {
public static void main(String[] args) {
System.out.println("请输入年份");
Scanner s=new Scanner(System.in);
int y=s.nextInt();
while(true) {
if ((y%4==0 && y%100!=0)||y%400==0) {
System.out.println(y+"年是闰年");
}else {
System.out.println(y+"年不是闰年");
}
}
}
}
输入一个年份判断它是不是闰年
最新推荐文章于 2019-05-22 17:30:54 发布