[单项选择题] 窗体上有一个名为Command1的命令按钮,并有下面的程序:Private Sub Command1_Click()Dim arr(5) As IntegerFor k = 1 To
14 查阅
[单项选择题] 窗体上有一个名为Command1的命令按钮,并有下面的程序:Private Sub Command1_Click()Dim arr(5) As IntegerFor k = 1 To 5arr(k) = kNext kprog arr()For k = 1 To 5Print arr(k);Next kEnd SubSub prog(a() As Integer)n = UBound(a)For i = n To 2 step-1For j = 1 To n-1if a(j) < a(j+1) Thent=a(j):a(j)=a(j+1):a(j+1)=tEnd IfNext jNext iEnd Sub程序运行时,单击命令按钮后显示的是()。
A .1 2 3 4 5
B .5 4 3 2 1
C .0 1 2 3 4
D .4 3 2 1 0
参考答案: