vb怎么反转一个一维数组?
1个回答
展开全部
Dim a(10) As Integer, b(10) As Integer
Private Sub Command1_Click()
Dim i As Integer
For i = 1 To 10
a(i) = Int(Rnd * 90 + 10)
Next i
For i = 1 To 10
Print a(i);
Next i
End Sub
Private Sub Command2_Click()
Dim i As Integer, t As Integer
For i = 1 To 5
b(i) = a(11 - i)
b(11 - i) = a(i)
Next i
For i = 1 To 10
Print b(i);
Next i
End Sub
Private Sub Command3_Click()
End
End Sub
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询