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