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