Answered step by step
Verified Expert Solution
Question
1 Approved Answer
2. Write a testing program in main,cpp that calculates the average of a set of numbers, such as: Prompt the user to enter the number
2. Write a testing program in main,cpp that calculates the average of a set of numbers, such as: Prompt the user to enter the number of values to be calculated Create a new dynamic array of that size, called dArray Repeatedly prompt the user to enter values until the array is full show the values in dArray continue to add more values to dArray (that should let the dArray become a new double sized array) a. create a new double sized dArray; b. use a temporary array to keep all the item values; C. move the items from temp array to the new double sized dArray; d. delete the temp array, set its pointer to nullptr; e. add the additional items that exceeded original size; Calculate the sum and the average of the values in the double sized dArray Show the values in the new double sized dArray End the program
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started