it a an C++ and it need to accept an array as a parameter and loop though the array adding the array elements and return their sum divided by the number of elements used. Am confused on changed it to find the average added on with the highest and lowest number.
1 2 3 4 5 6 7 8 9 10
{
int i;
max = min = v[0];
for (i = 1; i < n; i++) ]
{
if (v[i] > max) max = v[i];
if (v[i] < min) min = v[i];
}