public class Text01 {
public static void main(String[] args) {
for (int nianfeng = 1990; nianfeng <= 2021; nianfeng++) {
if ((nianfeng % 4 == 0 & nianfeng % 100 != 0 )| (nianfeng % 100 == 0 & nianfeng / 400 == 0))
{
System.out.println(nianfeng);
}
}
}
}
教你输出闰年
最新推荐文章于 2024-11-03 11:01:20 发布