<span style="font-size:24px;">/*
*copyrights(c)2014,烟台大学计算机学院
*All rights reserved.
*文件名称:test.cpp
*作者:wangzhengqu
*完成日期2014.10.17
版本号:v1.0
问题:本月的天数。
年份year月份month
*/
#include <iostream>
using namespace std;
int main()
{
int year,month;
cout<<"请输入年份\n";
cout<<"月份\n";
cin>>year;
cin>>month;
if(month==2)
{
if(year%4==0)
cout<<"本月有29天";
else cout<<"本月有28天";
}
else
switch(month)
{
case 1:
case 3:
case 5:
case 7:
case 8:
case 10:
case 12:
cout<<"本月有31天"<<endl;
break;
case 4:
case 6:
case 9:
case 11:
cout<<"本月有30天";
break;
}
return 0;
}</span>
/**copyrights(c)2014,烟台大学计算机学院*All rights reserved.*文件名称:test.cpp*作者:wangzhengqu*完成日期2014.10.17版本号:v1.0问题:本月的天数。年份year月份month*/#include using namespace std;int main(){ int year,mont