A better algorithmGrade Average for N Students
Set total to zero
Set grade counter to one
Get number of students, nrStudents
While grade counter is <= nrStudents
Input the next grade
Add the grade into the total
Add one to the grade counter
end_while
Set the class average to the total / nrStudents
Print the class average
Previous slide
Next slide
Back to first slide
View graphic version