我是新手,我错在哪里
本想排序的3,5,6,9.可运行结果为3,9,5,6Private Sub Command1_Click()
Dim m(4) As Integer
Dim temp As Integer
Dim i As Integer
Dim j As Integer
m(1) = 9
m(2) = 3
m(3) = 6
m(4) = 5
For i = 1 To 3
For j = 2 To 4
If m(i) > m(j) Then
temp = m(i)
m(i) = m(j)
m(j) = temp
End If
Next j
Next i
Text1.Text = m(1)
Text2.Text = m(2)
Text3.Text = m(3)
Text4.Text = m(4)
End Sub