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

  1. Using a while loop structure, a loop based on a counter variable which will cycle through 10 iterations.
  2. With each iteration of the loop, request a grade from the user and add it to a running total.
  3. After the loop has ended, print to the console the overall total and the class average.
  4. 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


Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

Sure heres a Java code snippet using a while loop t... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!