展开全部
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
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
本回答被网友采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询