史上最简单最闰年方法

#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
int main()
{
int i, j,count=0;
for (i = 1000; i <= 2000; i++)
if ((i % 4 == 0 && i%100 != 0 )|| i % 400 == 0)
{
count++;
printf("%d “, i);
}
printf(”\ncount=%d\n",count);
system(“pause”);
return 0;
}

猜你喜欢

转载自blog.csdn.net/ZhangaZhaoLong/article/details/82780119