1. 分析VB程序,回答问题。
(1) 下列程序运行后,在标签Lab上显示的是

Private Sub Command1_Click()

Dim a As String, b As String, c As String

  a = "印象西湖"

  b = "中国"

  c = b + Mid(a, 1, 2)

  Lab.Caption = c

End Sub

(2) 下列程序运行后,在标签Label1上显示的是

Private Sub Command1_Click()

  Dim a As Single, b As Single, c As Single, w As Single

 w = 6: a = 60: b = 50: c = 30

  If w <= 10 And a + b + c <= 115 Then

    Label1.Caption = "携带"

  Else

    Label1.Caption = "托运"

  End If

End Sub

(3) 下列程序运行后,数组元素d(3)的值是

Private Sub Command1_Click()

  Dim d(1 To 8) As Integer

  Dim i As Integer

  For i = 1 To 8

    d(i) = 2 * i

    List1.AddItem Str(d(i))

  Next i

End Sub

【考点】
算法的控制结构;
【答案】

您现在未登录,无法查看试题答案与解析。 登录
综合题 普通
能力提升
真题演练
换一批