-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathproblem52.c
More file actions
33 lines (33 loc) · 857 Bytes
/
problem52.c
File metadata and controls
33 lines (33 loc) · 857 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
#include <stdio.h>
int main() {
int n;
scanf("%d", &n);
if (n == 1) {
printf("January\n");
} else if (n == 2) {
printf("February\n");
} else if (n == 3) {
printf("March\n");
} else if (n == 4) {
printf("April\n");
} else if (n == 5) {
printf("May\n");
} else if (n == 6) {
printf("June\n");
} else if (n == 7) {
printf("July\n");
} else if (n == 8) {
printf("August\n");
} else if (n == 9) {
printf("September\n");
} else if (n == 10) {
printf("October\n");
} else if (n == 11) {
printf("November\n");
} else if (n == 12) {
printf("December\n");
} else {
printf("Invalid month number\n"); // Additional validation for out-of-range input
}
return 0;
}