-
Notifications
You must be signed in to change notification settings - Fork 0
/
Switch case.txt
65 lines (60 loc) · 1.19 KB
/
Switch case.txt
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
57
58
59
60
61
62
63
64
65
#include <stdio.h>
int main()
{
int H;
printf("Please select the day.\n");
printf("Option 1 = Monday\n");
printf("Option 2 = Tuesday\n");
printf("Option 3 = Wednesday\n");
printf("Option 4 = Thursday\n");
printf("Option 5 = Friday\n");
printf("Option 6 = Saturday\n");
printf("Option 7 = Sunday\n");
scanf("%d",&H);
switch(H){
case 1:
{
printf("You have selected Monday.\n");
printf("No Holiday");
break;
}
case 2:
{
printf("You have selected Tuesday.\n");
printf("No Holiday");
break;
}
case 3:
{
printf("You have selected Wednesday.\n");
printf("No Holiday");
break;
}
case 4:
{
printf("You have selected Thursday.\n");
printf("No Holiday");
break;
}
case 5:
{
printf("You have selected Friday.\n");
printf("No Holiday");
break;
}
case 6:
{
printf("You have selected Saturday.\n");
printf("Holiday");
break;
}
case 7:
{
printf("You have selected Saturday.\n");
printf("Holiday");
break;
}
default:
{
printf("Give correct input");
}}}