This C++ program takes user input of multiple numbers, adds them together, and calculates the average. The user first enters the number of elements to provide as input. The program then prompts the user to input each number, adds it to the running sum, and after all numbers are entered it divides the total sum by the original number of elements to calculate the average.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
46 views1 page
6 +Average+of+Numbers
This C++ program takes user input of multiple numbers, adds them together, and calculates the average. The user first enters the number of elements to provide as input. The program then prompts the user to input each number, adds it to the running sum, and after all numbers are entered it divides the total sum by the original number of elements to calculate the average.