有如下程序:#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<<","<<"

admin2009-01-15  40

问题 有如下程序:#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

答案1

解析
转载请注明原文地址:https://kaotiyun.com/show/X5kp777K
0

最新回复(0)