1个回答
展开全部
Private Sub Form_Click()
Dim a(9) As Integer, max As Integer, min As Integer, arg As Single, i As Integer
Randomize
For i = 0 To 9
a(i) = Int(Rnd * 100) + 1
arg = arg + a(i)
If i = 0 Or a(i) > max Then max = a(i)
If i = 0 Or a(i) < min Then min = a(i)
Print a(i);
Next
Print "最大值:"; max
Print "最小值:"; min
Print "平均值:"; arg / 10
End Sub
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询