Long description
The lines read as follows. Line 1. Initialize total to zero. Line 2. Initialize counter to zero. Line 3. Blank. Line 4. Prompt the user to enter the first grade. Line 5. Input the first grade left parenthesis possibly the sentinel right parenthesis. Line 6. Blank. Line 7. While the user has not yet entered the sentinel. Line 8, indented once. Add this grade into the running total. Line 9, indented once. Add one to the grade counter. Line 10, indented once. Prompt the user to enter the next grade. Line 11, indented once. Input the next grade left parenthesis possibly the sentinel right parenthesis. Line 12. Blank. Line 13. If the counter is not equal to zero. Line 14, indented once. Set the average to the total divided by the counter. ...
Get Android How to Program, 3/e now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.