Question: Write a C++ program that calculates an average of several integers entered by the user. It first prompts the user to enter the number of

Write a C++ program that calculates an average of several integers entered by the user. It first prompts the user to enter the number of integers she wants to average, then allows the user to enter the integers one by one, then calculates and displays the result as a floating point number. You must use an array to store the integers; use a loop to fill the array; write a separate function called "average()", which will be called from the main function, and to which the array and its size will be passed as two parameters. You will need to use a loop inside the average function, as well as cast an integer into a float to get a floating point result

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock 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 Databases Questions!