#include

#include<math.h>

#include<stdlib.h>

#include<time.h>

#include<string.h>

int main()

{

//判断是否是闰年

//1.能被4整除,且不能被100整除的年份;

//2.能被400整除的年份

int year = 0;

int count = 0;

int count1 = 0;

printf("请输入一个年份:> ");

scanf("%d", &year);

//for (year = 1000; year <= 2000; year++)

{

 if (year % 4 == 0 && year % 100 != 0)

 {

  printf("普通闰年是:%d\n", year);

  count++;

  Sleep(10);

 }

 else if (year % 400 == 0)

 {

  printf("世纪闰年是:%d\n", year);

  Sleep(10);

  count1++;

 }

 else

 {

  printf("%d 不是闰年\n", year);

 }


}

 /*printf("1000~2000年的普通闰年有 %d 个\n", count);

 printf("1000~2000年的世纪闰年有 %d 个\n", count1);*/

return 0;

}