Question: In part 3 , you will be working individually to finish the following exercise using 1 D static array. Files needed for this part: array.cpp
In part you will be working individually to finish the following exercise using D static array. Files needed for this part: array.cpp
Prompt the user for the size of the array, ensuring the size is between and inclusive. If an invalid size is given, reprompt until a valid size is provided. Note: you may assume that the user will enter an integer value. ie you are required to handle errors of the same data type
Implement a function named populatearray that takes an integer array, and the array size as parameters and fills the array with randomly generated values. Each element in the array should be a random integer between and inclusive.
void populatearray int array int size;
Print out the following statistics of the generated array:
o The sum of all elements in the array.
o The maximum and minimum value among the array elements. o The average of all array elements.
After presenting the statistics, ask the user if they want to perform the entire process again. If the user chooses to repeat, go back to step If they choose to quit, end the program.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
