Problem 2 in English
Previous slide
Next slide
Back to first slide
View graphic version
Problem: The marks for 70 students are to be entered. Find and display the average mark.
Use a loop controlled by a counter set to 70 when the program begins.
Semi-English solution:
Initialize counter, sum, maxmark
WHILE counter <= maxmark
Prompt for the mark
GET mark
Echo the mark
Add mark to sum
Increment counter
ENDWHILE
Calculate average using sum, maxmark
PUT average