第1个回答 2011-06-15
Private Sub Command1_Click()
Dim a(9)
Randomize
Dim sum As Integer, min As Integer, max As Integer
sum = 0: min = 100: max = 0
For i = 0 To 9
a(i) = Int(101 * Rnd))
sum = sum + a(i)
If a(i) < min Then min = a(i)
If a(i) > max Then max = a(i)
Print a(i);
Next i
Print vbCrLf & "最大值:"; max
Print "最小值:"; min
Print "平均值:"; sum / 10
End Sub本回答被提问者采纳