Dim a(14) As Integer
Dim b(10) As Integer
Private Sub Command1_Click()
For i = 1 To 14
a(i) = Int(100 * Rnd()) ‘这里产生100以内的随机数,如要个位数,改成10
Print a(i);
Next i
For i = 1 To 14
x = a(i)
Do
j = a(i) Mod 10
b(j) = b(j) + 1
x = x 10
Loop Until x = 0
Next i
For i = 0 To 9
If b(i) > 0 Then Print "有"; b(i); "个"; i
Next i
End Su