vb二维数组排序(见补充)
展开全部
Dim a(100) As Integer
Dim temp As Integer
Private Sub Command1_Click()
Print "排序前"
Randomize
For i = 1 To 100
a(i) = Int(Rnd * 901 + 100)
Print a(i);
If i Mod 10 = 0 Then Print
Next i
Print "排序后"
For i = 1 To 100
For j = 1 To 100 - i
If a(j) > a(j + 1) Then
temp = a(j + 1)
a(j + 1) = a(j)
a(j) = temp
End If
Next j
Next i
For i = 1 To 100
a(i) = Int(Rnd * 901 + 100)
Print a(i);
If i Mod 10 = 0 Then Print
Next i
End Sub
更多追问追答
追问
哥们你这不太对啊
追答
咋啦?哪里有问题呀?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询