Initialize total to zero
Initialize counter to zero
Input the first grade
while the user has not as yet entered the sentinel
add this grade into the running total
add one to the grade counter
input the next grade (possibly the sentinel)
endwhile
if the counter is not equal to zero
set the average to the total divided by the counter
print the average
else
print 'no grades were entered'
endif