Write a program that uses a counter-controlled while loop to prompt the user to enter how many scores they want to average. Input the number and use it as the maximum value in the evaluation of the control. Remember to use a variable for a counter initialized to 1, an accumulator initialized to 0, a max value variable to hold the number of scores the user wants to average, and a variable to hold the scores that the user enters. Remember inside the loop body to prompt the user to enter the scores, accumulate the scores (hint sum = sum + score), and update the counter (hint count++). Outside of the loop, calculate and display the average (hint: sum/max).
Explanation / Answer
#include using namspace std; int main(){ int max,counter=0, input; double sum=0; coutmax; while(counter