Boost your Grades with us today!

Write a function named “subtotal” takes as its arguments the following: (1) An array of floating…

Write a function named “subtotal” takes as its arguments the following:(1) An array of floating point values; (2) An integer that tells the number of cells in the array.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.8 | 2.6 | 9.1 | 3.4 | 7.0Then when the function will update the array so that it looks like this:5.8 | 8.4 | 17.5 | 20.9 | 27.9Because 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.

Looking for a Similar Assignment? Our Experts can help. Use the coupon code SAVE30 to get your first order at 30% off!