执行以下程序段后,整形变量C的值为( )。 a=24 b=328 Select Case b\10 Case 0 c=a*10+b Case 1 to 9 c= a*100+b Case 10 to 99 c= a*1000+b End Select
举一反三
- 假设X的值是5,则执行以下语句时,可得到的输出结果是ABCDEF的Select Case语句是 ( ) A: Select Case X Case 10 To 1 Print“ABCDEF” End Select B: Select Case X Case Is>15,Is<5 Print"ABCDEF" End Select C: Selecl Case K Case Is>5,1,3,To 10 Print"ABCDEF" End Select D: Select Case X Case 1,3,Is>5 Print"ABCDEF" End Select
- 假定x的值为5,则在执行以下语句时,其输出结果为"Result"的正确表示Select Case语句是( ) A: Select Case x Case 1 To 10 Print "Result" End Select B: Select Case x Case Is>5,Is<5 Print "Result" End Select C: Select Case x Case Is>5,1,3 To 4 Print "Result" End Select D: Select Case x Case 1,3,Is>5 Print "Result" End Select
- 执行下列程序段后,变量 x 的值为( )。 x = 12select case x\10 case 1 x = 1 case 2 x = 2end select A: 1 B: 2 C: 12 D: 出错
- 下列程序段的执行结果为a=1b=0Select Case a Case 1 Select Case b Case 0 Print"**0**" Case 1 Print"**1**" End SelectCase 2 Print"**2**"End Select A.* * 0 * * B.* * 1 * * C.* * 2 * * D.0
- 以下程序段中,执行结果与其他3个选项不同的是 A: Dim y As Integer B: y = 11 C: Select Case y D: Case 15 To 5 E: Print "Executed" F: End Select G: Dim y As Integer H: y = 10 I: Select Case y J: Case Is > 10, Is < 10 K: Print " Executed " L: End Select M: Dim y As Integer N: y = 10 O: Select Case y P: Case Is > 15, 1, 5 To 8 Q: Print " Executed " R: End Select S: Dim y As Integer T: y = 10 U: Select Case y V: Case 1, 3, Is > 6 W: Print " Executed " X: End Select