Answered step by step
Verified Expert Solution
Link Copied!

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

image text in transcribed

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Online Market Research Cost Effective Searching Of The Internet And Online Databases

Authors: John F. Lescher

1st Edition

0201489295, 978-0201489293

More Books

Students also viewed these Databases questions