Private Sub Command1_Click()
Randomize
Dim a(5, 5) As Integer
Print "产生的序列是:"
For i = 1 To 5
For j = 1 To 5
a(i, j) = Int(10 * Rnd)
s = s + a(i, j)
If a(i, j) > 0 Then n = n + 1
Print a(i, j);
Next j
Next i
Print "非零值的和是:"; s; " 一共有"; n; "个"
End Sub
没说清楚整数的随机范围