Hi. Could someone tell me if this is possible? If so why isnt it running?
I want to know if you can use if statements in cases.
Code:int main(void); { int x; printf("please enter a number between 1 and 100"); scanf("%d",&x); switch(x) { case 1: if(x <= 50) { printf("you entered a number below or equal to 50"); } break; case 2: if (x >50; x<=100) { printf("you entered a number from 50 to 100 "); } break; default: printf("please enter a value between 1 and 100"); break; } }