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
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