成绩评价ABCD等级
Private Sub Command1_Click()
Dim s(10) As Long
Dim a As Long
Dim i As Long
Dim p As Long
For i = 1 To 20
a = InputBox("请输入第" & i & "个分数:", "输入框")
Print a; "";
If i Mod 5 = 0 Then Print
p = Int(a / 10)
If p < 6 Then p = 5
s(p) = s(p) + 1 (这句不懂)
Next i
Print
Print "levelA:"; s(10) + s(9)
Print "levelB:"; s(8)
Print "levelC:"; s(7) + s(6)
Print "levelD:"; s(5)
[解决办法]
s(p)=s(p)+1
不是
s(p)=s(p+1)
[解决办法]