码迷,mamicode.com
首页 > 其他好文 > 详细

习题1-7

时间:2018-10-14 00:17:15      阅读:97      评论:0      收藏:0      [点我收藏+]

标签:std   return   div   ret   include   pre   clu   lse   amp   

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

年份

习题1-7

标签:std   return   div   ret   include   pre   clu   lse   amp   

原文地址:https://www.cnblogs.com/zhuzehua/p/9784655.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!