tubeshowcase●1,166,765 videos♡ My collection 0
← Learn to Code

Learn to Code03:40

C switch statements 🔽

Bro Code ↗

From the creator

C switch tutorial example explained #C #switch #switches // switch = A more efficient alternative to using many "else if" statements // allows a value to be tested for equality against many cases char grade; printf("\nEnter a letter grade: "); scanf("%c", &grade); switch(grade){ case 'A': printf("perfect!\n"); break; case 'B': printf("You did good!\n"); break; case 'C': printf("You did okay!\n"); break; case 'D': printf("At least it's not an F!\n"); break; case 'F': printf("YOU FAILED!\n"); break; default: printf("Please enter only valid grades"); } return 0;

Published 2021-09-01 · Watch on YouTube ↗
Availability and playback restrictions are controlled by the original channel.

Keep exploring Learn to Code