Write a method called sumArray that accepts an array of floating point values and returns the sum of the values stored in the array.
What will be an ideal response?
```
public float sumArray(float[] values)
{
float sum = 0;
for (int index = 0; index < values.length; index++)
sum += values[index];
return sum;
}
```
Computer Science & Information Technology
You might also like to view...
Given that s = 5, t = 2, p = 5, and q = 6 what will be the value of m in the following equation? (Note: assume that all variables are declared as integers.) double m = s / t + q / p;
A. 3.3333333 B. 2.0 C. 0.7 D. 3.0
Computer Science & Information Technology
For each network reference model layer, the software handles packages of data, which are called packet defined units.
Answer the following statement true (T) or false (F)
Computer Science & Information Technology