So this is my first time programming. I am getting the hang of it pretty well. I created a program that asks the user to input arrays. Now, I need to calculate the average of the inputted arrays, and I need to place them in order from low to high. I have been struggling with doing these two parts for a while now and now decided that the book is no help, I need some from some actual programmers. I attached my program. Look at it and help me. I have been doing so well up to this point and now I am just completely clueless. I appreciate it everyone who helps!!
My program printed here!
Code:#include <iostream> using namespace std; int main() { int size = 10; int *pointer = NULL; cout << "Number of expected times:" <<endl; int input; cin >> input; pointer = newint[input]; int temp; for( int counter = 0; counter < input ; counter ++){ cout << "Enter Expected Time:" <<counter + 1<<endl; cin >> userInput[1]; *(pointer+counter) = temp; } cout << "The Expected Times are:"<<endl; for( int counter = 0; counter < input ; counter ++){ cout <<counter +1 << "Expected Time:" <<*(pointer+counter)<<endl; cout << " The Average Expected Time is " << userInput[2] << endl; } delete [] pointer; return 0; }