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 | #include <stdio.h> #include <stdlib.h> int main() { int marks=75; switch (marks) { case 97: case 95: case 90: case 85: printf("Excellent"); break; case 75: case 70: printf("Very Good"); break; case 60: printf("good"); break; case 40: printf("Ok"); break; default: printf("Grade unavailable"); } } |
switch Statement (C)
C Programming switch...case Statement -
Switch Case in C and C++
C Tutorial – The if and switch statement
C switch case rules - C Programming