编写如下程序: Private Sub Command1_Click() Dim m As Integer, n As Integer m = 2 : n = 1 Select Case m Case 1

admin2015-06-30  28

问题 编写如下程序:
Private Sub Command1_Click()
   Dim m As Integer, n As Integer
   m = 2 : n = 1
   Select Case m
      Case 1
          Select Case n
             Case 1
                Print "AAA"
             Case 2
                Print "BBB"
          End Select
      Case 2
         Print "CCC"
   End Select
End Sub
程序运行后,单击命令按钮Command1,输出结果为

选项 A、AAA
B、BBB
C、CCC
D、1

答案C

解析 Select Case语句后面跟的是条件。根据条件执行相应的分支语句。m=2,因此执行Select Case m中的Case 2分支语句。选C)。
转载请注明原文地址:https://kaotiyun.com/show/ZkQp777K
0

最新回复(0)