demon(7310026) 19:26:27 Dim a(1 To 10) As Integer Dim publicShu As Integer
Private Sub Command1_Click() Dim q As Integer
Dim ifExists As String
q = 0
Do DoEvents If publicShu > 10 Then Exit Do ifExists = "" q = 0 q = Int(Rnd() * 10 + 1) ifExists = "" For i = 1 To 10 If a(i) = q Then ifExists = "yes" Exit For End If Next i If ifExists = "" Then Exit Do End If Loop
If q > 0 Then
For i = 1 To 10 If a(i) = 0 Then a(i) = q publicShu = publicShu + 1 Exit For End If Next i
List1.AddItem q End If
End Sub
Private Sub Form_Load() For i = 1 To 10 a(i) = 0 Next i List1.Clear publicShu = 0