Implementing Break and Switch Statement – C

#include<stdio.h>
int main()
{ 
enum Weekdays{Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday};
enum Weekdays today = Sunday;

switch(today)
{
case Monday:
printf("Today is Sundayn");
break;
case Sunday:
printf("Today is Mondayn");
break;
case Tuesday:
printf("Today is Tuesdayn");
break;

printf("whatever");
break;
} 
return 0;
}

Scroll to top