Option Explicit
Private Sub Command1_Click()
Dim A(9) As Integer, i%, m%, t%, AA%
For i = 0 To 9
Randomize
A(i) = Int(Rnd * 90) + 10
Print A(i);
Next
For i = 0 To 8
t = i
For m = i + 1 To 9
If A(m) < A(t) Then t = m
Next m
If t i Then AA = A(i): A(i) = A(t): A(t) = AA
Print A(i);
Next i
Print A(9)
End Su