Question: Lab 12.docx Saved on device: Exercise #2: SubTotal Write three functions named readArray(), subtotal(), display) each takes as its arguments the following (1) an array


Lab 12.docx Saved on device: Exercise #2: SubTotal Write three functions named readArray(), subtotal(), display) each 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: 2 5.8 2.6 |9.1 3.4 7.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.82.6 8.4 and 5.8+2.69.1 17.5 and so on. Note that the contents of cell 0 are not changed. The function should not return a value. Use the following main) function: int main() int n,l,r,d; float A[20
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
