本月几天
来源:互联网 发布:迅龙数据恢复软件 编辑:程序博客网 时间:2024/05/01 07:03
- /*
- *Copyright (c) 2012, 烟台大学计算机学院
- * All rights reserved.
- * 作 者:王俊
- * 完成日期:2012 年 10 月 29 日
- * 版 本 号:v1.0
- * 输入描述:略
- * 问题描述:略
- * 程序输出:略
- * 问题分析:略
- * 算法设计:
*/ #include<iostream>using namespace std;int main(){int year,month,day;cout<<"Please entre year month:";cin>>year>>month;switch(month){case 1:day=31;break;case 2:if(year%4==0&&year%100!=0||year%400==0) { day=29;break; }else{day=28;break;}case 3:day=31;break;case 4:day=30;break;case 5:day=31;break;case 6:day=30;break;case 7:day=31;break;case 8:day=31;break;case 9:day=30;break;case 10:day=31;break;case 11:day=30;break;case 12:day=31;break;}cout<<"本月有"<<day<<"天"<<endl;return 0;}
运行结果:
- 本月几天
- 本月几天
- 本月有几天?
- 本月有几天
- 本月有几天
- 本月有几天?
- 计算本月有几天
- 本月有几天
- 本月有几天
- 本月有几天,亲
- 本月有几天
- 本月有几天
- 求本月有几天
- 本月有几天
- 本月有几天
- 本月有几天
- 本月有几天
- 本月有几天
- aChartEngine图表显示(1)
- MongoDB学习笔记 MongoDB的插入更新--upsert
- 你的脸在我的记忆里变得模糊不清:伤感日志
- 六十六、基础框架(二十四)文件操作-目录操作
- $("A+B")、next()、$("A~B")、nextAll()及相关方法
- 本月几天
- 正在郁闷的人不妨进来转转
- 移动web前端开发,隐藏浏览器地址栏(全屏)解决方案
- How to Handle Javascript Alert, Prompt, Confirmation dialog using selenium webdriver?
- 项目开发之项目分析
- 六十七、基础框架(二十五)文件操作-列举 目录内容
- ASP.NET与IIS配置问题总结!
- struts2配置
- 细说Cookie