下面程序的输出结果是()mai(){itx=1,a=0,b=0;switch(x){case0:b++;case1:a++;case2:a++;b++;}pritf(“a=%d,b=%d”,a,b);}
举一反三
- 以下程序的输出是()#icludestdio.hvoidmai(){itx=1,y=0,a=0,b=0;switch(x){case1:switch(y){case0:a++;break;case1:b++;break;}case2:a++;b++;break;case3:a++;b++;}pritf(a=%d,b=%d,a,b
- 以下程序段的输出结果是( ) 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);
- 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); } 该程序的输出结果是( )
- 04410012:写出下面程序输出结果( )。 int main( ) { int x=1, y=0, a=0, b=0; switch(x) {case 1: switch(y) { case 0: a++; case 1: b++; } 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); } 该程序的输出结果是( ).