试题 试卷
题型:单选题 题类:常考题 难易度:普通
浙江省杭州市五县七校2016-2017学年高二上学期期中联考信息技术试题
Dim j As Integer, k As Integer
List Clear
For k = 1 To 100
j = Int(Sqr(k))
If j * j = k Then list1.AddItem Str(k)
Next k
分析程序功能,该程序的功能是( )
i = 1
Do While i <= 5
If i = 0 or a(i - 1) <= a(i) Then
i = i + 1
Else
t = a(i): a(i) = a(i - 1): a(i - 1) = t
i = i - 1
End If
Loop
For i = 1 To 5
List2.AddItem a(i)
Next i
数组元素a(0)到a(5)的值依次为“0,71,22,48,79,27”,经过该程序段“加工”后,数组元素a(4)的值为( )
Private Sub Command1_Click()
Dim a(0 To 5) As Integer
Dim i As Integer ’①
a(0) = 1 '②
a(i) = 2 * a(i - 1) + 1 '③
Text1.Text = Str(a(6)) '④
End Sub
试题篮