试题

试题 试卷

logo

题型:单选题 题类:常考题 难易度:普通

浙江省“七彩阳光”2020届高三信息技术新高考研究联盟阶段性评估试卷

有如下 VB 程序段

Private Sub Command1_Click()

Dim a(1 To 6) As Integer

Dim d(1 To 6) As Integer

a(1) = 28: a(2) = 21: a(3) = 30: a(4) = 11: a(5) = 12: a(6) = 29

Const n = 6

Max = 0

For i = 1 To n

    d(i) = 0

    For j = 1 To i - 1

     If a(j) < a(i) Then d(i) = d(i) + 1

    Next j

    If d(i) > Max Then Max = d(i)

Next i

End Sub

执行完以上程序后,Max的值为(  )

A、5 B、2 C、3 D、4
举一反三
返回首页

试题篮