1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#include<iostream>
using namespace std;
int main()
{
int m;
cout< <"请输入一个数(1-12):\n";
cin>>m;
if (m>=1&&m< =12)
{
switch (m)
{
case 1:
cout<<"一月!\n";
break;
case 2:
cout<<"二月!\n";
break;
case 3:
cout<<"三月!\n";
break;
case 4:
cout<<"四月!\n";
break;
case 5:
cout<<"五月!\n";
break;
case 6:
cout<<"六月!\n";
break;
case 7:
cout<<"七月!\n";
break;
case 8:
cout<<"八月!\n";
break;
case 9:
cout<<"九月!\n";
break;
case 10:
cout<<"十月!\n";
break;
case 11:
cout<<"十一月!\n";
break;
case 12:
cout<<"十二月!\n";
break;
}
}
else
{
cout<<"输入有误!\n";
}
system("pause");
return 0;
}