Private Sub Command1_Click()
Dim a(20) As Integer
Print "产生的数:"
For i = 1 To 20
a(i) = Int(Rnd * 201)
Print a(i);
Next i
For i = 1 To 19
For j = 1 To 20 - i
If a(j) < a(j + 1) Then
t = a(j): a(j) = a(j + 1): a(j + 1) = t
End If
Next j
Next i
Print "排序以后:"
For i = 1 To 20
Print a(i);
Next i
End Sub