/*
2. * 程序的版权和版本声明部分
3. * Copyright (c)2013, 烟台大学计算机学院学生
4. * All rightsreserved.
5. * 文件名称:score.cpp
6. * 作 者:刘明亮
7. * 完成日期: 2013 年 3 月 8 日
8. * 版本号: v1.0
9. * 输入描述:
10. * 问题描述:
11. * 输出:
*/
#include<iostream>
using namespace std;
void season(int month);
int main()
{
int m;
cout<<"Input month:";
cin>>m;
season(m);
return 0;
}
void season(int month)
{
switch(month)
{
case 3:
case 4:
case 5:cout<<"此月为春季。"<<endl;break;
case 6:
case 7:
case 8:cout<<"此月为夏季。"<<endl;break;
case 9:
case 10:
case 11:cout<<"此月为秋季。"<<endl;break;
case 12:
case 1:
case 2:cout<<"此月为冬季。"<<endl;break;
default :cout<<"选择有误,请重新输入。"<<endl;break;
}
}