C
This commit is contained in:
42
switch.c
Executable file
42
switch.c
Executable file
@ -0,0 +1,42 @@
|
||||
#include <stdio.h>
|
||||
int main() {
|
||||
int day = 8;
|
||||
|
||||
|
||||
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("there's 7 day in week!");
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
Reference in New Issue
Block a user