Private Sub Command1_Click()
Dim a(10) As Integer
Dim mystr As String
Dim printstr As String
a(1) = Int(Rnd() * 100 + 1)
printstr = Str(a(1))
For i = 2 To 10
t = Int(Rnd() * 100 + 1)
mystr = "要"
For k = 1 To i - 1
If t = a(k) Then
mystr = "不要"
Exit For
End If
Next
If mystr = "不要" Then
i = i - 1
Else
a(i) = t
printstr = printstr + Str(t)
End If
Next
Print printstr
End Sub