题型:综合题 题类:常考题 难易度:普通
浙江省高中信息技术 算法及其程序实现单元检测
Dim n As Integer
Dim a(1 To 100) As Integer
’n=10,排序前生成的数据存储在数组a中,并在列表框List1中显示,代码略
Private Sub Command1_Click()
Dim i As Integer, j As Integer, start As Integer, t As Integer
i=2
Do While i < n start=n
For j=n To i Step-1
IfThen
t=a(j):a(j)=a(j-1):a(j-1)=t
End If
Next j
i=start+1
Loop
For i=1 To n
List2.AddItem
Next i
End Sub
试题篮