Private Sub Command1_Click()
Dim a(1 To 20)
Dim max, ave, min, sum
max = 0
min = 300
Print "产生的20个数为:";
For i = 1 To 20
a(i) = Int(Rnd() * 100 + 101)
Print a(i);
sum = sum + a(i)
If a(i) > max Then max = a(i)
If a(i) < min Then min = a(i)
Next
Print
Print "平均值为"; sum / 20; "最大值为:"; max; "最小值为:"; min
End Sub
EASY