C语言switch语句
#include<stdio.h>void main(){
int a,b;
a = 1;
b = 0;
switch(a)
{case 1:
switch(b)
{case 0: printf("**0**");break;
case 1: printf("**1**");break;
}
case 2: printf("**2**");break;
}
}
请问为什么这个的错误在哪?
#include<stdio.h>
void main(){
int a,b;
a = 1;
b = 0;
switch(b)
{case 0: printf("**0**"); break;
case 1: printf("**1**"); break;
case 2: printf("**2**");break;
}
} case 1那里没有break
页:
[1]