#define _CRT_SECURE_NO_WARNINGS 1
#include <stdio.h>
#include<stdlib.h>
int main()
{
int i;
int count = 0;
for (i = 1000; i <= 2000; i++)
{
if (i % 4 == 0 && i % 100 != 0 || i % 100 == 0 && i % 400 == 0)
{
printf("%d\n", i);
count++;
}
}
printf("\ncount= %d ", count);
system("pause");
return 0;
}
输出1000年---2000年之间的闰年
猜你喜欢
转载自blog.csdn.net/qq_44828389/article/details/100567264
今日推荐
周排行