Listing 2
//Populate the array in reverse order.
getData(values,size);
//Display contents of the array in forward
// order.
cout << "Array contents:" << endl;
displayData(values,size);
//Compute and display average, minimum, and
// maximum values.
cout << "Average: " << getAvg(values,size)
<< endl;
cout << "Minimum: " << getMin(values,size)
<< endl;
cout << "Maximum: " << getMax(values,size)
<< endl;
}//end doSomething function
Listing 2
|