有如下程序:includevoid main(){int x=1,a=0,b=0;switch (x){Case 0: b++;Case 1: 有如下程序:#include<iostream.h>void main(){int x=1,a=0,b=0;switch (x){Case 0: b++;Case 1: a++;Case 2: a++; b++;}cout<<"a="<<a<<","<<"b="<< b;}该程序的输出结果是( )。A.a=2,b=1B.a=1,b=1C.a=1,b=0D.a=2,b=2
有如下程序:includevoid main(){int x=1,a=0,b=0;switch (x){Case 0: b++;Case 1:
有如下程序:#include<iostream.h>void main(){int x=1,a=0,b=0;switch (x){Case 0: b++;Case 1: a++;Case 2: a++; b++;}cout<<"a="<<a<<","<<"b="<< b;}该程序的输出结果是( )。
A.a=2,b=1
B.a=1,b=1
C.a=1,b=0
D.a=2,b=2
相关考题:
请阅读以下程序:includemain(){int x=1,y=0,a=0,b=0;switch(x){case 1:switch(y){case 请阅读以下程序: #include<stdio.h> main() { int x=1,y=0,a=0,b=0; switch(x) { case 1: switch(y) { case 0:a++;break;} case 2: a++,b++;break;} printf("a=%d,b=%d\n",a,b); 上面程序的输出结果是A.a=2,b=1B.a=1,b=1C.a=1,b=0D.a=2,b=2
有以下程序:includemain(){intx=1,y=0,a=0,b=0;switch(x){case 1:switch(y){case 0:a+ 有以下程序: #include<stdio.h> main() { int x=1,y=0,a=0,b=0; switch(x) { case 1: switch(y) { case 0:a++;break; case 1: b++;break; } case 2:a++;b++;break; case 3:a++;b++; } printf("a=%d,b=%d\n",a,B); } 程序的运行结果是( )。A.a=1,b=0B.a=2,b=2C.a=1,b=1D.a=2,b=1
有以下程序includemain(){intx=1,y=0,a=0,b=0; switch(x) {case1:switch(y){case0:a++ 有以下程序 #include <stdio.h> main() { int x=1,y=0,a=0,b=0; switch(x) { case 1: switch(y) { case 0:a++; break; case 1:b++; break; } case 2:a++;b++; break; case 3:a++;b++; } printf("a=%d,b=%d\n",a,b); } 程序的运行结果是A.a=1,b=0B.a=2,b=2C.a=1,b=1D.a=2,b=1
有如下程序:includemain(){int x=1,a=0,b=0; switch(x) {casc 0:b++;case 1:a++;case 有如下程序: #include<stdio.h> main() { int x=1,a=0,b=0; switch(x) { casc 0:b++; case 1:a++; case 2:a++;b++; } printf("a=%d,b=%d\n",a,b); } 该程序的输出结果是( )。A.a=2,b=1B.a=1,b=1C.a=1,b=0D.a=2,b=2
有以下程序includemain(){intx=1,y=0,a=0,b=0;switch(X){case1:switch(y){case0:a++;b 有以下程序 #include <stdio.h> main() { int x=1,y=0,a=0,b=0; switch(X) { case 1: switch(y) { case 0:a++; break; case 1:b++; break; } case 2:a++;b++;break; case 3:a++;b++; } printf("a=%d,b=%d\n",a,b); } 程序A.a=1,b=0B.a=2,b=2C.a=1,b=1D.a=2,b=1
有下列程序:includemain(){int x=1,y=0,a=0,b=0;switch(x){ case 1:switch(y){ case 0 有下列程序: #include <stdio.h> main() { int x=1,y=0,a=0,b=0; switch(x) { case 1: switch(y) { case 0:a++;break; case 1:b++;break; } case 2: a++;b++;break; case 3: a++;b++; } printf("a=%d,b=%d\n",a,B) ; } 程序的运行结果是( )。A.a=1,b=0B.a=2,b=2C.a=1,b=1D.a=2,b=1
有如下程序: #include"iostream.h" void main() { int x=1,a=0,b=0; switch(x){ case 0:b++; case 1:a++; case 2:a++;b++; } cout << "a=" <<a << " ," <<"b=" << b; } 该程序的输出结果是A.a=2,b=1B.a=1,b=1C.a=1,b=0D.a=2,b=2
请阅读以下程序:includemain(){ int x=1,y=0,a=0,b=0;switch(x){ case 1:switch(y){ c 请阅读以下程序: #include<stdio.h> main() { int x=1,y=0,a=0,b=0; switch(x) { case 1: switch(y) { case 0:a++;break; case 2: a++,b++;break;} printf("a=%d,b=%d\n" ,a,b); 上面程序的输出结果是( )。A.a=2,b=1B.a=1,b=1C.a=1,b=0D.a=2,b=2
下面程序的正确输出结果是()。 main() { int x=1,y=0,a=0,b=0; switch(x) { case 1:switch(y) { case 0:a++;break; case 1:b++;break; } case 2:a++;b++;break; case 3:a++;b++; } printf(“%d %dn”,a,b); }A.1 0B.2 1C.1 1D.2 2