Private Sub Command1_Click()
Dim i As Integer
Dim min As Double
Dim max As Double
Dim s As Double
Dim sum As Double
min = 100
For i = 1 To 8
s = Val(InputBox("请输入成绩"))
If max < s Then
max = s
End If
If min > s Then
min = s
End If
sum = sum + s
Next
Print "去掉一个最高分" & max & ",去掉一个最低分" & min
Print "总分为" & sum - max - min & ",平均分为" & (sum - max - min) / 6
End Sub