博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
实验二 2
阅读量:4598 次
发布时间:2019-06-09

本文共 332 字,大约阅读时间需要 1 分钟。

#include "stdafx.h"

int main(int argc, char* argv[]) {

     int year;   printf("input the year:");

     scanf("%d",&year);

     if(year%4==0)

  {

        if(year%100!=0)

        printf("29");

        else

        {

          if(year%400==0)

          printf("29");

          else

          printf("28");

        }

}

     else

     printf("28");//year:2014,month:2,days:28

     return 0;

 }

转载于:https://www.cnblogs.com/P201821440046/p/10670913.html

你可能感兴趣的文章
python小练——找出指定目录下小于指定字节的文件,输出到文本文件
查看>>
渐渐磨砺--16年11月封闭总结
查看>>
[zz]GDB调试精粹及使用实例
查看>>
数据库的创建和删除
查看>>
【消息队列MQ】各类MQ比较
查看>>
最简单的三层实例【插入据
查看>>
设计模式学习笔记——Prototype原型模式
查看>>
pom.xml里有红叉报错的解决办法
查看>>
Perl last和next的用法区别
查看>>
Selenium 管理 Cookies
查看>>
exceptionfunction[LeetCode]Permutations
查看>>
Linux(2)_常用命令2
查看>>
自定义分页
查看>>
[转]DELPHI——调试(1)
查看>>
JS秒数转成分秒时间格式
查看>>
xp_cmdshell 命令的开启与关闭,和状态查询
查看>>
Linux sudoers
查看>>
MySQL详解(18)-----------分页方法总结
查看>>
bzoj 4595 激光发生器
查看>>
multi cookie & read bug
查看>>