Question: how to solve this on C++? Exercise #3 : SubTotal Write a function named subtotaltakes as its arguments the following a one dimensional array offloating

 how to solve this on C++? Exercise #3 : SubTotal Write

how to solve this on C++?

Exercise #3 : SubTotal Write a function named "subtotal"takes as its arguments the following a one dimensional array offloating point values; an integer that tells the number ofcells in the array The function should replace the contents of each cell with the sum of the contents ofall 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: 1 3 5.81 2.61 9.113.41 7.0 Then when the function returns, the array will have been changed so that it looks like this 5.81 8.41 17.51 20.91 27.9 1 3 Note that the contents of cell 0 are not changed. The function should notreturn 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: 5 Please enter the values for your array: 1 2 3 45 6 10 15

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!