Private Sub Command1_Click()
Cls
Dim a(1 To 100) As Integer, min As Integer, n As Integer
Randomize
min = 100
Print "产生的随机数为:"
For i = 1 To 100
a(i) = Int(Rnd * 100) + 1
Print Tab(5 * ((i - 1) Mod 10)); a(i);
If i Mod 10 = 0 Then Print
If min > a(i) Then min = a(i)
Next i
For i = 1 To 100
If a(i) = min Then n = n + 1
Next i
Print "最小元素为:" & min & ",其出现次数为:" & n
End Sub