+ 1
What are these error..?
A label can only be a part of a statement and declaration is not a statement Expected expression before.., all im getting are these errors https://code.sololearn.com/cwegZa2Z9HKq/?ref=app
1 Resposta
+ 2
You can put semicolon (empty statement) at the end of case statement (right after colon), like this:
case 1: ;
int num;
.....
.....
case 2: ;
...
Or, better, move all variable declaration outside of the switch.
Put it before switch statement
int num;
int r;
int n;
char word[8];
switch(j)
{
.....
Declare variable before switch statement