第1个回答 2009-03-20
Dim a(49) As Integer, i As Integer, j As Integer, t As Integer
For i = 0 To 49
Randomize
a(i) = Int(Rnd() * 90 + 10)
For j = 0 To i - 1
If a(i) = a(j) Then
i = i - 1
Exit For
End If
Next j
Next i
For i = 0 To 48
For j = i + 1 To 49
If a(j) < a(i) Then
t = a(i): a(i) = a(j): a(j) = t
End If
Next j
Next i
For i = 0 To 49
Print a(i);
If (i + 1) Mod 10 = 0 Then Print
Next i本回答被网友采纳