#include<stdio.h>
main()
{
int year;
for(year=1000;year<=2000;year++)
{
if((year%4==0&&year%100!=0)||(year%400==0))
printf("%d\n",year);
}
return 0;
}
判断闰年
最新推荐文章于 2023-02-26 15:19:02 发布
#include<stdio.h>
main()
{
int year;
for(year=1000;year<=2000;year++)
{
if((year%4==0&&year%100!=0)||(year%400==0))
printf("%d\n",year);
}
return 0;
}