February 2014
Beginner
1248 pages
62h 25m
English
Line 17 indicates that the while statement should continue looping (also called iterating) as long as gradeCounter’s value is less than or equal to 10. While this condition remains true, the while statement repeatedly executes the statements between the braces that delimit its body (lines 18–23).
Line 19 displays the prompt "Enter grade: ". Line 20 reads the grade entered by the user and assigns it to variable grade. Then line 21 adds the new grade entered by the user to the total and assigns the result to total, which replaces its previous value.
Line 22 adds 1 to gradeCounter to indicate that the program has processed a grade and is ready to input the next grade from the user. Incrementing ...
Read now
Unlock full access