Private Sub Command1_Click()
Dim a(10) As Integer
Dim temp As Integer
Print "输入的原始数字是:";
For i = 1 To 10
a(i) = InputBox("请输入第" & i & "个数字")
Print a(i) & " ";
Next i
Print
Print "排序后的数字是:";
For i = 1 To 10
For j = 1 To 10 - 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 10
Print a(i) & " ";
Next i
End Sub
温馨提示:答案为网友推荐,仅供参考