打开vb后点击commandbutton
进入界面后输入
Private Sub Command1_Click()
ClsDim n As Integer, s As Integer
Dim a(10) As Integer
n = 1
While n <= 10
a(n) = Int(Rnd * 1000)
n = n + 1
Wend
n = 1
While n <= 10
Print a(n)
n = n + 1
Wend
End Sub
打开vb后点击commandbutton
进入界面后输入
Private Sub Command1_Click()
ClsEnd Sub