Please help me. I have code as following
Why (1) and (2) cause errors. In switch of C, doesn't support multiple const and interval constant ?Code:#include <stdio.h>
int main()
{
int num = 1;
switch (num)
{
case 1, 3, 5://causes error - (1)
printf("Even");
break;
case 6..7://causes error - (2)
printf("Unknown");
break;
default:
printf("Ok");
}
return 0;
}