[填空题] 在窗体上画一个名为Command1的命令按钮,然后编写如下程序: Option Base 1 Private Sub Command1_ Click()Dim arrarr = Arr

19 查阅

[填空题] 在窗体上画一个名为Command1的命令按钮,然后编写如下程序:

Option Base 1

Private Sub Command1_ Click()

Dim arr

arr = Array(358, 32, 46, 73, 23, 59, 26, 91, 583, 12)

For i = ______

For j = ______

If arr(i) >= arr(j) Then

a = arr(j)

arr(j) = arr(i)

arr(i) = a

End If

Next j

Next i

For i = 1 To 10

Print arr(i);

Next i

End Sub

程序运行后,单击命令按钮,将把数组arr中的10个数按升序排序,请填空。

参考答案:

1 To 9 或 1 To UBound (arr) -1 i + 1 To 10 或 i + 1 To UBound (arr)

计算机考试