Question: Write a C++ program that calculates the sum / product of a set of numbers. Your program should follow the below algorithm: 1) Prompt the
Write a C++ program that calculates the sum / product of a set of numbers. Your program should follow the below algorithm:
1) Prompt the user to enter the number of values to be calculated
Create a dynamic array of that size, called dArray1
Repeatedly generate random two digit number until the array is full
Calculate the sum of the number values show the sum of the values in dArray1
2) Create a new dynamic array dArray2, with double size and new randowmvalues from dArray1, for example: 10,26,11,90,35, 19,22,43,15,68
Calculate the product of the values in the new array
Show the product of the values in dArray2
Delete the two dynamic arrays before terminating the program
o Notes: read about delete [] versus delete
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
