-
Notifications
You must be signed in to change notification settings - Fork 0
/
Switch.c
53 lines (42 loc) · 951 Bytes
/
Switch.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
44
45
46
47
48
49
50
51
52
53
/*Write a C program to read no 1 to 7 and print relatively
day Sunday to Saturday*/
#include<stdio.h>
int main()
{
int a, b;
label:
printf("Enter Any Number Between 1 to 7.\n");
scanf("%d", &a);
switch (a)
{
case 1:
printf("Today Is Sunday");
break;
case 2:
printf("Today Is Monday");
break;
case 3:
printf("Today Is Tuesday");
break;
case 4:
printf("Today Is Wednesday");
break;
case 5:
printf("Today Is Thursday");
break;
case 6:
printf("Today Is Friday");
break;
case 7:
printf("Today Is Saturday");
break;
default:
printf("Please Enter The Valid Number");
break;
}
/* printf("\nEnter 0 For Next And Any NUmber For Quit.");
scanf("%d", &b);
if (b == 0)
goto label;*/
return 0;
}