在随机数中输出最小值,题中min的值为什么会是0
Private Sub Command1_Click()Dim a(10) As Integer
Max = a(0): Min = a(0)
Print "随机数为:";
For i = 0 To 9
a(i) = Int(10 + Rnd * (90))
If i = 5 Then
Print Tab(10);
End If
Print a(i);
Sum = Sum + a(i)
If Max < a(i) Then Max = a(i)
If Min > a(i) Then Min = a(i)
Next
s = Sum \ 10
Print "最大值为:"; Max
Print "最小值为:"; Min '为什么等于0
Print "平均值为:"; s
End Sub