Question: USING C++ Exercise #2: SubTotal Write a function named subtotal takes (1) an array of floating point values; (2) an integer that tells the number

USING C++
Exercise #2: SubTotal Write a function named "subtotal" takes (1) an array of floating point values; (2) an integer that tells the number of cells in the array as its arguments the following 2/4 The function should replace the contents of each cell with the sum of the contents of all the cells in the original array from the left end to the cell in question. Thus, for example, if the array passed to the function looks like this: 5.82.61 9.13.47.0 Then when the function returns, the array will have been changed so that it looks like this 5.88.4 17.5 20.9 27.9 Because 5.8 + 2.6 = 8.4 and 5.8 + 2.6 + 9.1 = 17.5 and so on. Note that the contents of cell 0 are not changed. The function should not return a value. Write a main program that tests and validates the subtotal function. Sample input/output: Please enter the number of values in the array: Please enter the values for your array: 10 13.2 Process returned 0 (0xe) execution time 19.703 s Press any key to continue
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
