"Write a C++ console application that accepts up to 5 numbers from the user. Display

all numbers, the highest, the lowest, and the average of the numbers.

The user does not have to enter all 5 numbers. They can enter fewer. However,

of course, you need at least two numbers to be able to look for the highest and

the lowest. Make sure you explain this for the user.

Create three functions to perform the following tasks:

Calculate the highest number.

Calculate the lowest number.

Calculate the average.

All three functions receive an array and return a single value.

Keep track of the number of the values the user enters. Remember, they do

not have to enter all 5 numbers."

**Im having trouble with the part where they DONT HAVE TO ENTER THE FIVE NUMBERS. can any one suggest me or point me to what it is required??**.. This is my Code

//This proggram calculates the average, the lowest, and the hights of five numbers. //Gabriel Barrera //CSIT 743 8/26/2013 #include <iostream> using namespace std; const int ARRAY_SIZE = 5; //Creat A const Array int numbers_entered[ARRAY_SIZE]; // Arrary SIZE and Declare array void calculate_highest() //Calculates the Highest { int highest = numbers_entered[0]; for (int i = 1; i < ARRAY_SIZE; i++)// loop to catch the highest { if (numbers_entered[i] > highest) highest = numbers_entered[i]; } cout << "The Highest of the numbers is " << highest << endl; } void calculate_lowest() // Calculates the lowest { int lowest = numbers_entered[0]; for (int i = 1; i < ARRAY_SIZE; i++)// Loop to catch the lowest { if (numbers_entered[i] < lowest) lowest = numbers_entered[i]; } cout << "The lowest of the numbers is " << lowest << endl; } void calculate_average() { double total = 0; double average = 0; //Initiaize the accumulator for (int counter = 0; counter < ARRAY_SIZE; counter++) // loop for the average { total += numbers_entered[counter]; average = total / numbers_entered[counter]; } cout << "The average of the numbers is : " << average << endl; } int main() //Main function are better at the bottom no lousy PROTOTYPEs { cout << "This proggram calculates the average, the lowest, and the hights of five numbers." << endl; cout << "Please Enter up to 5 numbers. "; for (int counter = 0; counter < ARRAY_SIZE; counter++) // loop for the array { cout << endl << "Please Enter a number : "; cin >> numbers_entered[counter]; } //Summon all the previous functions calculate_average(); calculate_highest(); calculate_lowest(); system("pause"); return 0; }