Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
switch-case statement in C
#1
int day = 3;
switch (day) {
    case 1:
        printf("Monday\n");
        break;
    case 2:
        printf("Tuesday\n");
        break;
    // ...
    default:
        printf("Invalid day\n");
}
Also follow me on Youtube for videos about video games:
https://www.youtube.com/channel/UCxfkGVU...2mQ/videos
Reply


Messages In This Thread
switch-case statement in C - by Qomplainerz - 07-25-2023, 10:53 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)