Using a while loop structure, a loop based on a counter variable which will cycle through 10
Fantastic news! We've Found the answer you've been seeking!
Question:
- Using a while loop structure, a loop based on a counter variable which will cycle through 10 iterations.
- With each iteration of the loop, request a grade from the user and add it to a running total.
- After the loop has ended, print to the console the overall total and the class average.
- Define any appropriate variables you need.
Expected Output.
Enter grade: 88
Enter grade: 78
Enter grade: 98
Enter grade: 99
Enter grade: 67
Enter grade: 78
Enter grade: 79
Enter grade: 100
Enter grade: 87
Enter grade: 56
Total of all 10 grades is 830
Class average is 83
Related Book For
Computer Architecture A Quantitative Approach
ISBN: 978-0123704900
4th edition
Authors: John L. Hennessy, David A. Patterson
Posted Date: