32.零起点学算法26——判断是否闰年

#include<stdio.h>
int main()
{
    int n;
    while(scanf("%d",&n)!=EOF)
    {
        if(((n%4==0)&&(n%100!=0))||(n%400==0))
        printf("yes\n");
        else
        printf("no\n");
    }
    return 0;
}

猜你喜欢

转载自www.cnblogs.com/Estwind/p/9751149.html