Output each floating-point value with two digits after the decimal point, which can be achieved by executing
cout << fixed << setprecision(2); once before all other cout statements.
(1) Prompt the user to enter five numbers, being five people's weights. Store the numbers in an array of doubles. Output the array's numbers on one line, each number followed by one space.
(2) Output the total weight, by summing the array's elements.
(3) Output the average of the array's elements.
(4) Output the maximum array element.
Your program must define and call the following two functions:
double totalWeight (double weights[]) to compute and return the total weight.
double maxWeight (double weights[]) to return the maximum value in the array.
Your program MUST NOT use a vector. Your program must use an array to store the weights, and loops to input and process the values.