vb程序设计生成10个0到100间随机整数存于数组A,然后将这10个数逆序重放到A
展开全部
Private Sub Command1_Click()
Dim A(1 To 10) As Integer
Randomize
Print "生成10个0到100间随机整数:"
For i = 1 To 10
A(i) = Int(Rnd * 101)
Print A(i);
Next
For i = 1 To 5
t = A(i)
A(i) = A(11 - i)
A(11 - i) = t
Next
Print "10个数逆序重放到A:"
For i = 1 To 10
Print A(i);
Next
End Sub
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询