题型:综合题 题类:常考题 难易度:困难
浙江省浙南名校联盟2020届高三上学期信息技术第一次(10月)联考试卷
Dim a(1000) As Integer, n As Integer Private Sub Command1_Click()
'从数据库获取n 个成绩存储在 a(1)---a(n)组中,代码略
For i = 2 To n ‘排序
tmp = a(i)
j = 1
Do While tmp > a(j)
j = j + 1
If ① Then Exit Do
Loop
For k = i To j + 1 Step -1
a(k) = a(k - 1)
Next k
'改错 (1)
Next i
For i = 1 To n List1.AddItem Str(a(i))
Next i End Sub
Private Sub Command2_Click()
Dim key As Integer, i As Integer, j As Integer, m As Integer
key = Val(Text1.Text)
i = 1: j = n
Do While i <= j
m = (i + j) \ 2
If ② Then
j = m - 1
Else
i = m + 1
End If
Loop
Label1.Caption = "共有" + ③ + "位同学大于等于该成绩。"
End Sub
①②③
试题篮