#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
#include <stdlib.h>
int runnian(int i)
{
return(((i % 4 == 0) && (i % 100 != 0)) || (i % 400 == 0));
}
int main()
{
int i = 0;
printf("请输入要判断的年份");
scanf("%d", &i);
if (runnian(i))
printf("%d是闰年", i);
else
printf("%d不是闰年",i);
getchar();
system("pause");
return 0;
}