找考题网-背景图
填空题

下面的程序随机产生10个小于100的整数,并找出其最大值、最小值和平均值,请将程序补充完整。(此程序是VB语言编写)
Private Sub Form_Click( )
Dim a(1 To 10)As Integer
Dim m_max As Integer,m_min As Integer
Dim s As Single
Randomize
For i=1 To 10
a(i)=______
Print a(i)
Next i
m_max=0:m_min=100
For i=1 To 10
If a(i)>m_max Then
If a(i)<m min Then m_min=a(i)
s=______
______
Print"最大值是:";m_max
Print"最小值是:";m_min
Print"平均值是:";______
End Sub

【参考答案】

s+a(i)
热门试题

填空题m_max=a(i)

填空题Int(Rnd*99)+1