试题

试题 试卷

logo

题型:综合题 题类:常考题 难易度:普通

浙江省杭州市西湖高级中学2018-2019学年高二上学期信息技术开学考试试卷

分析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

举一反三
返回首页

试题篮