Private Sub Sort(Arry() As Integer, ByVal N As Integer)
Dim I As Integer, J As Integer, K As Integer, Temp As Integer
For I = 0 To N - 2
K = I
For J = I + 1 To N - 1
If Arry(K) > Arry(J) Then
K = J
End If
Next J
If K > I Then
Temp = Arry(K): Arry(K) = Arry(I): Arry(I) = Temp
End If
Next I
End Sub
Dim I As Integer, J As Integer, K As Integer, Temp As Integer
For I = 0 To N - 2
K = I
For J = I + 1 To N - 1
If Arry(K) > Arry(J) Then
K = J
End If
Next J
If K > I Then
Temp = Arry(K): Arry(K) = Arry(I): Arry(I) = Temp
End If
Next I
End Sub
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货