Question: In C++ Question 2(6 points): Array stats Write a function stats that takes two parameters: an array and the number of elements in the array.
In C++

Question 2(6 points): Array stats Write a function stats that takes two parameters: an array and the number of elements in the array. Then, it computes and prints the maximum value, the product and the average value of all the values in the array. The output should be formatted with three-digit precision. You may assume that the array will be non-empty. Function specifications: The function name: stats The function parameters (in this order): An array, double The number of elements stored in the array, int The function should not return anything. O o Sample run 1 Test 1: 1.24, 5.68, 3.456 Max: 5.680 Product: 24.341 Avg: 3.459 Sample run 2 Test 2: 0 Max: 0.000 Product: 0.000 Avg: 0.000 The file should be named as arrayStats.cpp. Don't forget to head over to the CodeRunner on Canvas and paste only your function in the answer box
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
