main() { int x=1,a=0,b=0; switch(x) { case 0:b++; case 1:a++; case 2:a++;b++; } printf("a=%d,b=%d",a,b); } 运行改程序后a和b的值分别为()
举一反三
- main() {int x=1,a=0,b=0; switch (x) { case 0: b++; case 1: a++; case 2: a++;b++;} printf("a=%d,b=%d
- 下面程序的运行结果是_______。 #include int main( ) { int x = 1 , a = 0 , b = 0 ; switch( x ) { case 0 : b++ ; case 1 : a++ ; case 2 : a++ ; b++ ; } printf( "%d,%d" , a , b ) ; return 0 ; }
- main() {int x=1,a=0,b=0; switch (x) { case 0: b++; case 1: a++; case 2: a++;b++;} printf("a=%d,b=%d",a,b); } 该程序的输出结果是( )
- 请输出以下程序的运行结果()。void main(){ int x=1,a=0,b=0;switch(x){case 0: b++;case 1: a++;case 2: a++;b++;}printf("a=%d,b=%d",a,b);}
- void main() { int x=1,a=0,b=0; switch (x) { case 0: b++; case 1: a++; case 2: a++;b++; } printf("a=%d,b=%d",a,b); } 该程序的输出结果是( ).