1个回答
展开全部
Sub rndn(a() As Integer, n As Integer)
For i = 1 To n
a(i) = Int(Rnd * 100) + 1
Next i
End Sub
Private Sub Command1_Click()
Dim b() As Integer, m As Integer
Static k As Integer
m = Val(Text1)
ReDim b(m)
Call rndn(b(), m)
k = k + 1
Picture1.Print "第"; k; "次产生"; m; "个随机整数,分别为:"
For i = 1 To m
Picture1.Print b(i);
Next i
Picture1.Print
End Sub
这个可以实现
如果有问题请追问,满意请采纳!
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询