//判断1000年-2000年之间的闰年
#include<stdio.h>
int main()
{
int count = 0;
for (int year= 1000; year <= 2000; year++)
{//四年一闰,百年不闰,400年一闰
if ((year % 4 == 0 && year % 100 != 0) || (year % 400 == 0))
{
printf("%d ", year);
count++;
}
}
printf("\n%d ", count);
system("pause");
return 0;
}