[求助]输入五个数值排序,用数组的,需要详细的解释一下意思。
Private Sub Form_Activate()Dim a(4) As Integer
Dim i As Integer
Print "原来的五位数是:"
For i = 0 To 4
a(i) = Val(InputBox("请输入数据:"))
Print a(i);
Next i
Max = a(0): Min = a(0)
For i = 1 To 4
If a(i) > Max Then
Max = a(i)
ElseIf a(i) < Min Then
Min = a(i)
End If
Next i
Print "最大数是:"; Max; "最小数是:"; Min
End Sub
若是排序,第二个FOR....NEXT之间因该怎么编。若是N个数值,因该怎么编??