forked from ksvkabra/learn-cpp
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmonth.cpp
More file actions
49 lines (49 loc) · 702 Bytes
/
month.cpp
File metadata and controls
49 lines (49 loc) · 702 Bytes
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
#include <iostream>
using namespace std;
int main()
{
int a, b = 14;
cout << "enter any number:";
cin >> a;
switch (b, a)
{
case 1:
cout << "January";
break;
case 2:
cout << "february";
break;
case 3:
cout << "march";
break;
case 4:
cout << "april";
break;
case 5:
cout << "may";
break;
case 6:
cout << "june";
break;
case 7:
cout << "july";
break;
case 8:
cout << "august";
break;
case 9:
cout << "september";
break;
case 10:
cout << "october";
break;
case 11:
cout << "november";
break;
case 12:
cout << "december";
break;
default:
cout << "no month exists";
}
}