//对你的代码改动较大,请自行参考
#include
#define ARRAY_SIZE 1
int isLeapYear(int);
int year[ARRAY_SIZE];
int isLeapYear(int i)
{
return((year[i]%4==0) && (year[i]%100!=0)) || (year[i]%400==0);
}
int main()
{
int i;
printf("输入某年的年份:");
for (i=0;i{
scanf("%d",&year[i]);
if (isLeapYear(i))
{
printf("闰年\n");
}
else
{
printf("平年\n");
}
}
getch();
}