-
Notifications
You must be signed in to change notification settings - Fork 16
/
16.c
executable file
·43 lines (39 loc) · 828 Bytes
/
16.c
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
#include <stdio.h>
void intro(void)
{
printf("Name: Sharafat\n");
printf("Id : 2102024\n");
}
int main()
{
intro();
int day;
printf("Enter the numeric weekday value (1-7): ");
scanf("%d", &day);
switch(day) {
case 1:
printf("Monday");
break;
case 2:
printf("Tuesday");
break;
case 3:
printf("Wednesday");
break;
case 4:
printf("Thursday");
break;
case 5:
printf("Friday");
break;
case 6:
printf("Saturday");
break;
case 7:
printf("Sunday");
break;
default:
printf("Invalid input. Please enter a value between 1 and 7.");
}
return 0;
}