Private Sub Command1_Click()
Dim a() As Integer,i,j,m,n As Integer
Print "产生100个100~300之间的整数"
Randomize
For i = 1 To 100
j = Int(Rnd * 201) + 100
If j Mod 3 = 0 Then
n = n + 1
ReDim Preserve a(n)
a(n) = j
End If
Print j;
m = m + 1
If m Mod 10 = 0 Then Print
Next
Print "能被3整除的数"
m = 0
For i = 1 To n
Print a(i);
m = m + 1
If m Mod 10 = 0 Then Print
j = j + a(i)
Next
Print "个数="; n
Print "和="; j
End Su