Private Sub Form_Click()
Dim a(10) As Integer
Randomize
For i = 0 To 9
a(i) = Int(21 + 50 * Rnd()) '可以拆开吗?
Next
For i = 0 To 9
Print a(i);
Next
b = a(i)
flag = 1 '假设不重复
For i = 0 To 9
If a(i) = b Then
flag = 0
i = i - 1
Exit For
End If
Next
If flag = 1 Then
Print a(i)
End If
End Sub
为毛输出以后最后一个数是0 我改啊改啊的总有一个俩数的重复
梦里花落0921
收到一只叮咚