#include<stdio.h>
int main()
{
int count = 0;
int year = 0;
for (year = 1000; year <= 2000; year++)
{
if ((year % 4 == 0) && (year % 100 != 0) || (year % 400 == 0))
{
printf("%d ", year);
count++;
}
}
printf("count = %d\n", count);
system("pause");
return 0;
}
来源:CSDN
作者:流年碎雨
链接:https://blog.csdn.net/weixin_40123831/article/details/79620319