求助 小白 希望大神解答 很简单的问题
[local]1[/local]
#include<stdio.h>
int main()
{
int leap,year;
printf("please enter a year\n");
scanf("%d",year);
if(year%4==0)
{
if(year%100==0)
{
if(year%400==0)
{
leap=1;
else leap=0;
}
else
leap=1;
}
else
leap=0;
}
if(leap)
{
printf("闰");
else
printf("ping")
}
return 0;
}