本月有几天
来源:互联网 发布:能听着背单词的软件 编辑:程序博客网 时间:2024/06/10 14:27
/*
*烟台大学计算机与控制工程学院
*all rights reserved.
*文件名称:test.cpp
*作 者:高玉杰
*完成日期:2016年3月25日
*/
#include <iostream>
using namespace std;
int main()
{
int year,month;
int t=0;
cin>>year>>month;
if((year%4==0&&year%100!=0)||year%400==0)
t=1;
if(t==0)
{
if(month==1||month==3||month==5||month==7||month==8||month==10||month==12)
cout<<"31"<<endl;
if(month==4||month==6||month==9||month==11)
cout<<"30"<<endl;
if(month==2)
cout<<"28"<<endl;
}
if(t==1)
{
if(month==1||month==3||month==5||month==7||month==8||month==10||month==12)
cout<<"31"<<endl;
if(month==4||month==6||month==9||month==11)
cout<<"30"<<endl;
if(month==2)
cout<<"29"<<endl;
}
return 0;
}
0 0
- 本月有几天?
- 本月有几天
- 本月有几天
- 本月有几天?
- 计算本月有几天
- 本月有几天
- 本月有几天
- 本月有几天,亲
- 本月有几天
- 本月有几天
- 求本月有几天
- 本月有几天
- 本月有几天
- 本月有几天
- 本月有几天
- 本月有几天
- 得本月有几天
- 本月有几天
- uva 10254——The Priest Mathematician
- 未知图片宽高水平垂直居中
- 集合框架--TreeSet集合
- 安装开源在线教育平台edX的一个简单方法
- 第五周项目1 三角形类练习(4)
- 本月有几天
- File 类
- ehcache memcache redis三大缓存男高音
- AndroidStudio项目提交(更新)到github最详细步骤
- hdu 5651 (组合数学 + 阶乘求逆元)
- uestc1134男神的约会【状压dp】
- 判断是不是胖子
- CDOJ 1071 秋实大哥下棋
- 【09类和模块】——5:构造函数名称