博客
关于我
输出月份天数
阅读量:337 次
发布时间:2019-03-04

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

#include 
void main(){ int year,month; scanf("%d%d",&year,&month); switch(month) { case 1: case 3: case 5: case 7: case 8: case 10: case 12:printf("31\n");break; case 2: { if((year % 4 == 0 && year % 100 != 0) || year % 400 == 0) printf("29\n"); else printf("28\n"); break; } case 4: case 6: case 9: case 11:printf("30\n");break; default:printf("-1");break; }}

 

转载地址:http://lviq.baihongyu.com/

你可能感兴趣的文章
Nginx学习总结(5)——Nginx基本配置备忘
查看>>
Nginx学习总结(6)——Nginx + https + 免费SSL证书配置指南
查看>>
Nginx学习总结(7)——Nginx配置HTTPS 服务器
查看>>
Nginx学习总结(8)——Nginx服务器详解
查看>>
Nginx学习总结(9)——前端跨域问题解决
查看>>
nginx学习笔记
查看>>
nginx学习笔记001---Nginx的启动、停止与重启
查看>>
nginx学习笔记002---Nginx代理配置_案例1_实现了对前端代码的方向代理_并且配置了后端api接口的访问地址
查看>>
nginx学习笔记003---Nginx代理配置_注意,在Windows中路径要用/
查看>>
Nginx学习笔记(一) Nginx架构
查看>>
nginx学习路线
查看>>
Nginx安装
查看>>
Nginx安装SSL模块 nginx: the “ssl” parameter requires ngx_http_ssl_module in /usr/local/nginx/conf/nginx
查看>>
nginx安装stream模块配置tcp/udp端口转发
查看>>