Option Explicit
Dim a(9) As Integer, imax As Integer, imin As Integer, i As Integer, s As Integer
Private Sub Command1_Click()
If Text1.Text >= 0 And Text1.Text <= 100 Then
a(i) = Text1.Text
i = i + 1
Else
MsgBox "超范围", vbInformation, "提示"
End If
End Sub
Private Sub Command2_Click()
imax = 0
imin = 101
For i = 0 To 9
s = s + a(i)
If imax < a(i) Then imax = a(i)
If imin > a(i) Then imin = a(i)
Next i
Text2.Text = imax
Text3.Text = imin
Text4.Text = s / (i + 1)
End Sub
text1是分数输入的文本框,按command1确认读入。text2、3、4分别为最大最小和平均。望采纳!加油 ,这不会的话说明基础较差,要好好学习啊!