Private Sub Command1_Click()
Dim i%, mArr%(9), p%, Tmin%, s%, Odd$
For i = 0 To 9
Randomize (Timer)
mArr(i) = 10 + Int(Rnd * 90)
Print mArr(i);
Next
Print
For i = 0 To 8
Tmin = i
For p = i + 1 To 9
If mArr(p) < mArr(Tmin) Then Tmin = p
Next p
If Tmin <> i Then s = mArr(i): mArr(i) = mArr(Tmin): mArr(Tmin) = s
Next i
Print
For i = 0 To 9
Print mArr(i);
If mArr(i) Mod 2 = 0 Then Odd = Odd & mArr(i) & " "
Next i
Print
Print "偶数有:"
Print Odd
End Sub