按上述要求,编写一个VB程序,功能如下:在列表框List 1中显示整理前的数据,单击“整理”按钮Command 1,整理结果显示在列表框List 2中,程序运行界面如图所示。

(1)将数组元素q(1)到q(200)分为10段,如果每段恰好包含20个元素,采用选择排序算法分别对每段中的元素进行排序,整个排序过程中,数组元素之间的比较次数是________(单选,填字母:
A.![]() | B.![]() | C.![]() |








Private Sub Form_Load()
本过程读取城市序号,姓名和参加次数的数据分别存储在数组city;pname和times中,
并在List 1中显示,代码略
End Sub
Private Sub Command 1_Click()
Dim i As Integer,j As Integer,k As Integer,t As Integer,pos As Integer


Next i

①

Next i




Next i


②

Next i





Next j

Next i

List 2.AddItem " " & city(q(i))& " " & pname(q(i))& " " & times(q(i))
Next i
End Sub
Function fp(head As Integer,tail As Integer)As Integer
Dim i As Integer,k As Integer



Next i

End Function

同类型试题

y = sin x, x∈R, y∈[–1,1],周期为2π,函数图像以 x = (π/2) + kπ 为对称轴
y = arcsin x, x∈[–1,1], y∈[–π/2,π/2]
sin x = 0 ←→ arcsin x = 0
sin x = 1/2 ←→ arcsin x = π/6
sin x = √2/2 ←→ arcsin x = π/4
sin x = 1 ←→ arcsin x = π/2


y = sin x, x∈R, y∈[–1,1],周期为2π,函数图像以 x = (π/2) + kπ 为对称轴
y = arcsin x, x∈[–1,1], y∈[–π/2,π/2]
sin x = 0 ←→ arcsin x = 0
sin x = 1/2 ←→ arcsin x = π/6
sin x = √2/2 ←→ arcsin x = π/4
sin x = 1 ←→ arcsin x = π/2

