试题 试卷
题型:单选题 题类:常考题 难易度:容易
浙江省温州市苍南县巨人中学2014-2015学年高二下学期期中考试信息技术试题
Const n = 8
Dim a(1 To n) As Integer
For i = 1 To n
a(i) = Int(Rnd * 20)
Next i
x = n \ 2
For i = x To 2 Step -1
For j = 1 To i - 1
If a(j) < a(i) Then
t = a(j): a(j) = a(i): a(i) = t
End If
Next j
i = n
Do While i > x + 1
k = i
For j = i - 1 To x + 1 Step -1
If a(j) > a(k) Then k = j
If k <> i Then
t = a(k): a(k) = a(i): a(i) = t
i = i - 1
Loop
执行完这段代码后,数组 a 中各个元素的值可能的是( )
For i= 1 To 10
b(i)=0
For i= 1 To 5
For j= 1 To 10
If b(i) <a(j) Then
b(i)=a(j)
t=j
a(t)=0
List 1.Additem Str(b(i) )
其中数组元素a(1)到a(10)的值依次为“25,42,53,66,77,83,98,14,38,99”,执行程序后,在列表框List 1中依次输出的数据是( )
Private Sub Form_Click()
Dim arr(1 to 10, 1 to 10) As Integer
Dim i As Integer, j As Integer
For i =2 To 4
For j = 2 To 4
arr(i, j) = i * j
Label1.Caption =str(arr(2, 2)+ arr(3, 3))
End Sub
item={"竞技类":["铁人三项","电子竞技","霹雳舞"],"球类":["足球","篮球","乒乓球"],
"对抗性":["拳击","跆拳道","卡巴迪","击剑"],"水上":["跳水","龙舟","帆船"]}
print(item["对抗性"][2][::-1])
执行该程序段后,输出的结果是( )
试题篮