解题思路:
能被4整除且不能被100整除或者能被400整除的数
#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
int main()
{
int i;
for (i = 1000; i <= 2000; i++){
if ((i % 4 == 0 && i % 100 != 0) || (i % 400 == 0)){
printf("%d\n", i);
}
}
return 0;
system("pause");
}