判断闰年
# include <stdio.h>
int main ( )
{
int year;
scanf("%d",&year);
if(year%4==0)
{
if(year%100!=0)
printf("YES");
else
{
if(year%400==0)
printf("YES");
else
printf("NO");
}
}
else
printf("NO");
return 0;
}
# include <stdio.h>
int main ( )
{
int year;
scanf("%d",&year);
if(year%4==0)
{
if(year%100!=0)
printf("YES");
else
{
if(year%400==0)
printf("YES");
else
printf("NO");
}
}
else
printf("NO");
return 0;
}