以下语句正确的是:______。A.Select Case a Case b=1 Case “B” b=2 Case Else b=3 End SelectB.Select Case a Case “A” b=1 Case “B” b=2 Case Default b=3 End SelectC.Switch a Case “A” b=1 Case “B” b=2 Case Else b=3 End SwitchD.Switch a Case “A” b=1 Case “B” b=2 Case Default b=3 End Select

以下语句正确的是:______。

A.Select Case a Case b=1 Case “B” b=2 Case Else b=3 End Select

B.Select Case a Case “A” b=1 Case “B” b=2 Case Default b=3 End Select

C.Switch a Case “A” b=1 Case “B” b=2 Case Else b=3 End Switch

D.Switch a Case “A” b=1 Case “B” b=2 Case Default b=3 End Select


相关考题:

若有定义 : float x=1.5; int a=1,b=3,c=2; 则正确的 switch 语句是A)switch(x){ case 1.0: printf("*\n");case 2.0: printf("**\n");}B)switch((int)x);{ case 1: printf("*\n");case 2: printf("**\n");}C)switch(a+b){ case 1: printf("*\n");case 2+1: printf("**\n");}D)switch(a+b){ case 1: printf("*\n");case c: printf("**\n");}

若有以下定义,则正确的swish语句是______。 float x;int a,b;A.switch(x) {case 1.0:printf("*\n"); case 2.0:printf("**\n"); }B.switch(x) {case 1,2:printf("*\n"); case 3:printf("**\n"); }C.switch(a+b) {case 1:printf("\n"); case 1+2:printf("**\n"); }D.switch(a+b); {case 1:printf("*\n"); case 2:printf("**\n"); }

若有以下定义:float x;int a,b; 则错误的switch语句是________。 A. switch(x){case 1.0:printf("*\n"); case 2.0:printf("*\n"); }B. switch(a){case 1:printf("*\n");case 2:printf("*\n"); }C. switch(a+b) {case 1:printf("*\n"); case 1+2:printf("*\n"); }D. switch(a+b);{case 1:printf("*\n");case 2:printf("*\n"); }

若有以下定义,则正确的switch语句是______。float x;int a,b;A.switch(x) { case 1.0:printf("*\n"); csse 2.0:printf("**\n"); }B.switch(x) { case 1,2:printf("*\n"); case 3:printf("**\n"); }C.switch(a+b) { case 1:printf("\n"); case 1+2:printf("**\n"); }D.switch(a+b); { case 1:printf("*\n"); case 2:printf("**\n"); }

若有定义float x=1.5;int a=1,b=3,c=2;,则正确的switch语句是A.swimh(x) {case 1.0:printf("*\n"); case 2.0:printf("**\n");}B.switch((int)x); {case 1:printf("*\n"); case 2:printf("**\n");}C.switch(a+D. {case 1:pfintf("*\n"); case 2+1:pfintf("**\n");}switch(a-I-{case 1:pfintf("*\n"); case c:printf("**\n");}

若定义:float x;int a,b;,则正确的switch语句是( )。A.switch(x) { case1.0:cout<<"*\n"; case2.0:cout<<"**\n";B.switch(x) { case 1.2:cout<<"*\n"; case 3:cout<<"**\n"; }C.switch(a+b) { case 1.0:cout<<"*\n"; case 1+2:cout<<"**\n ";D.switch(a+b) { case 1:cout<<"*\n"; case 2:cout<<"**\n";

若a和b均是整型变量,以下正确的switch语句是()。A.switch(a/b) {case 0:case1.5:y=a+b;break; case 2:case 3:y=a-b; }B.switch(a*a+b*b); { case0:y=a+b;break; case1:y=b-a;break; }C.switch a {case 0:x=a+b; case 1:y=a-b;break;}D.switch(a+b) {case 0:x=a+b;break; case 1:y=a-b;break; }

1.若有定义:“float x=1.5; int a=1,b=3,c=2;”,则正确的switch语句是 。A.switch (x) {case 1.0:printf("*n"); case 2.0:printf("**n");}B.switch ((int)x) ; {case 1:printf("*n"); case 2:printf("**n");}C.switch (a+b) {case1:printf(**n); case c:printf(**n);}D.switch (a+b) {case 1:printf("*n"); case 2+1:printf("**n");}

若有定义:float x=1.5; int a=1, b=3, c=2;,则正确的switch语句是()。A.switch(x) { case 1.0: printf("*"); case 2.0: printf("**"); }B.switch((int)x); { case 1: printf("*"); case 2: printf("**"); }C.switch(a+b) { case 1: printf("*"); case 1+2: printf("**"); }D.switch(a+b) { case 1: printf("*"); case c: printf("**"); }