Page 1 of 1

Select the function that takes as its arguments the following: 1. an array of floating point values: 2. an integer that

Posted: Fri May 20, 2022 5:37 pm
by answerhappygod
Select The Function That Takes As Its Arguments The Following 1 An Array Of Floating Point Values 2 An Integer That 1
Select The Function That Takes As Its Arguments The Following 1 An Array Of Floating Point Values 2 An Integer That 1 (90.06 KiB) Viewed 45 times
Select the function that takes as its arguments the following: 1. an array of floating point values: 2. an integer that tells how many floating point values are in the array. The function should return as its value the sum of the floating point values in the array. Example: If the array that is passed to the function looks like this: 0 1 | 2 | 3 | 4 5.8 2.69.0 3.4|7.1 then the function should return the value 27.9 sum(float a[], int n) { float sumACC = 0.8; int i; for (i = 0; i < n; ++i) SUMACC += a[1]; float sum(float a[], int n) { float sumACC = e.e; int i; for (i = 0; i<n; ++i) SUMACC += a; return sumAcc; 1 int sum(int a[], int n) float sumAcc = @.@ int i; for (i = B; i <n; ++i) sumAcc + a; return sumACC) ) o float sum(int n, a[]) float sumace = 0.8; int i; for (i = 0; i<n; H1) SumAcc + a[1]; return Sumace 3