i feel stupid asking this because ive made programs that average numbers before, but right now im baffled. the problem i have to solve is as follows:
write a native c++ 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.
I'm not sure what you are trying to do on the average calculation; are you trying to print the average of each set of five numbers? I do not think that's what you are supposed to do - the assignment says print them "five to a line" and then the average...of all of the numbers.