+ 1

What is wrong in this

// Shared via Compiler App https://g633x.app.goo.gl/TPlw #include <stdio.h> int main() { int per; switch(per) { case 1:>75; printf("the grade is A"); case 2: >59 && <75; printf("the grade is B"); case 3:>49 && <60; printf("the grade is C"); case 4:>39 && <50; printf("the grade is D"); case 5: <40; printf("fail"); } return 0; }

24th Sep 2018, 4:08 PM
Keshav Halade
Keshav Halade - avatar
2 Respuestas
+ 5
Syntax is incorrect. You cannot compare values like this in switch statement
24th Sep 2018, 7:42 PM
blACk sh4d0w
blACk sh4d0w - avatar
0
any error
24th Sep 2018, 4:25 PM
Binoy Babu