闰年定义:能被4整除且不能整除100或者整出400的年份。
#include <stdio.h>
#include <stdlib.h>
int main()
{
int year=0;
for(year=1000;year<=2000;year++){
if(year%4==0&&year%100!=0||year%400==0)
{
printf("%d ",year);
}
}
system("pause");
}