Sub studentgrade()
Dim inti As Integer
Dim intx As Integer
Dim arstudent(1 To 3) As Integer
Dim average As Integer
Dim answer As Integer
Dim ave As Integer
average = 0
For inti = 1 To 10
average = 0
For intx = 1 To 3
arstudent(intx) = Cells(inti, intx + 1)
average = average + arstudent(intx)
answer = average / 3
ActiveSheet.Cells(inti, 5) = answer
Next intx
Next inti
For inti = 1 To 10
ave = ActiveSheet.Cells(inti, 5)
If ave >= 90 Then
ActiveSheet.Cells(inti, 6) = "A"
Else
If ave < 90 And ave >= 80 Then
ActiveSheet.Cells(inti, 6) = "B"
Else
If ave < 80 And ave >= 70 Then
ActiveSheet.Cells(inti, 6) = "C"
Else
If ave < 70 And ave >= 60 Then
ActiveSheet.Cells(inti, 6) = "D"
Else
If ave < 60 Then
ActiveSheet.Cells(inti, 6) = "E"
End If
End If
End If
End If
End If
Next inti
End Sub
{file i/o html code}
Sub all()
Call studentgrade
Call finalIO
End Sub