Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

in C+++ Write a program that allows an unlimited number of values to be entered

ID: 3685266 • Letter: I

Question

in C+++ Write a program that allows an unlimited number of values to be entered and stored in an array allocated in the free store. The program should then output the values, five to a line, followed by the average of the values entered. The initial array size should be five elements. The program should create a new array with five additional elements, when necessary, and copy values from the old array to the new. Please do this in the simplest way possible, as I am just in intro to C++, and please comment your code.

Explanation / Answer

#include #include using std::cin ; using std::cout ; using std::endl ; using std::setw ; int main() { //Initialize pointer, array sizer, and counter int* pArray = nullptr ; int MAX = 0 ; int total = 0 ; //Prompt input for size of array cout