sunshine的回答:
代码如下: Private Sub Form_Click() Dim temp As Integer "申明变量 Cls "清理窗体 Dim a(1 To 10) "申明数组变量 Print "颠倒前:" For i = 1 To 10 Randomize a(i) = Int(Rnd * 61 + 20) Print a(i); Next i Print Print "颠倒后:" For i = 1 To 5 temp = a(i) a(i) = a(11 - i) a(11 - i) = temp Next i For i = 1 To 10 Print a(i); Next i End Sub
sunshine的回答: