Dim i, t, j As Integer
Dim a(10) As Integer
For j = 1 To 10
a(j) = Rnd() * 101
Next
For i = 1 To 10
For j = 1 To 10 - i
If a(j) > a(j + 1) Then
t = a(j)
a(j) = a(j + 1)
a(j + 1) = t
End If
Next
Next
For j = 1 To 10
Label1.Text += a(j).ToString + vbCrLf
Next