高手指点一下这段代码哪里出问题了
输入10个同学3门课成绩,求每个同学的总分,并按总分从高到低顺序输出。(每个同学名次),但是指导老师说有问题,哪里出问题了,麻烦各位看一下,谢谢Private Sub Command1_Click()
Dim a(10, 5)
Print "成绩1"; Tab(6); "成绩"; Tab(12); "成绩"; Tab(18); "总分"; Tab(24); "名次"
For i = 1 To 3
a(i, 4) = 0
For j = 1 To 3
a(i, j) = Val(InputBox("第" & i & "个同学第" & j & "门成绩"))
a(i, 4) = a(i, 4) + a(i, j)
Next j
Next i
For i = 1 To 3
a(i, 5) = 1
For j = 1 To 3
If a(j, 4) > a(i, 4) Then
a(i, 5) = a(i, 5) + 1
End If
Next j
Next i
For i = 1 To 3
For j = 1 To 5
Print Tab((j - 1) * 6); a(i, j);
Next j
Next i
End Sub