发布网友 发布时间:2024-10-23 22:34
共2个回答
热心网友 时间:2024-10-24 08:37
最好加上Randomize语句来初始化Rnd的种子
Private Sub Command1_Click()
Dim rand!(1 To 100)
Text1.Text = ""
For i = 1 To 100
Randomize (Time())
rand(i) = Rnd()
Text1.Text = Text1.Text & rand(i) & Chr(32)
Next i
End Sub
热心网友 时间:2024-10-24 08:43
Dim a!(1 To 1000)
For i = 1 To 1000
a(i) = Rnd(1)
Print a(i)
Next i