close

程式碼:
Private Sub Command1_Click()
Dim num(1 To 5) As Integer
num(1) = Text1.Text
num(2) = Text2.Text
num(3) = Text3.Text
num(4) = Text4.Text
num(5) = Text5.Text
For j = 4 To 1 Step -1
For i = 1 To j
If num(i) > num(i + 1) Then
temp = num(i + 1)
num(i + 1) = num(i)
num(i) = temp
End If
Next i
Next j
Text6.Text = num(1)
Text7.Text = num(2)
Text8.Text = num(3)
Text9.Text = num(4)
Text10.Text = num(5)
End Sub
arrow
arrow
    全站熱搜

    愛爾 發表在 痞客邦 留言(7) 人氣()