+ 2
What do I put in for the "Fill in the blanks to calculate the sum of myArray's elements using the for loop" thing
double sum = 0.0; for (int x = 0; x < 4; x ) { sum += myArray[x]; } System.out.println( );
8 Answers
+ 3
x = [2, 5, 7, 3, 1]
res = 1
for n in x:
res *= n
print(res)
+ 1
++
sum
+ 1
++
sum
0
double sum = 0.0;
for (int x = 0; x < 4; x++)
{
sum += myArray[x];
}
System.out.println(sum);
0
double sum = 0.0;
for (int x = 0; x < 4; x
) {
sum += myArray[x];
}
System.out.println(sum);
0
I'm still confused, what would i put in the middle section?
0
there any one help me this i got the a answer of the last but what i fill thee middle,?
0
double sum = 0.0;
for (int x = 0; x <
4
; x++) {
sum += myArray[x];
}
<< sum << endl;