English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

i'm stuck on this question for java..

write a method called sumArray that accepts an array of floating point values and returns the sum of the value sstored in the array

2007-07-02 06:27:26 · 2 answers · asked by Anonymous in Computers & Internet Programming & Design

2 answers

float sumArray(float[] values) {
float sum = 0.0;
for (int i=0; i sum += values[i];
return sum;
}

2007-07-02 06:49:31 · answer #1 · answered by McFate 7 · 1 0

google has an answer type sumarray/enter

2007-07-02 13:31:06 · answer #2 · answered by ogdad223 4 · 0 0

fedest.com, questions and answers