+ 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( );

20th Jan 2017, 2:26 AM
Lilli Mifflin
8 ответов
+ 3
x = [2, 5, 7, 3, 1] res = 1 for n in x: res *= n print(res)
15th Jun 2021, 1:06 AM
Beden Dirk
Beden Dirk - avatar
+ 1
++ sum
29th Sep 2021, 5:03 AM
Vaarshini K
+ 1
++ sum
15th Nov 2021, 3:21 AM
Nabila Muftia Ma'ruf Kartono
Nabila Muftia Ma'ruf Kartono - avatar
0
double sum = 0.0; for (int x = 0; x < 4; x++) { sum += myArray[x]; } System.out.println(sum);
20th Jan 2017, 2:26 AM
lowshuen
0
double sum = 0.0; for (int x = 0; x < 4; x ) { sum += myArray[x]; } System.out.println(sum);
9th Aug 2018, 4:17 PM
Cesarino Ijak Rosa
Cesarino Ijak Rosa - avatar
0
I'm still confused, what would i put in the middle section?
11th Dec 2020, 12:24 PM
Alias
Alias - avatar
0
there any one help me this i got the a answer of the last but what i fill thee middle,?
20th May 2021, 4:56 PM
Abdulahi Jama
0
double sum = 0.0; for (int x = 0; x < 4 ; x++) { sum += myArray[x]; } << sum << endl;
9th Jun 2021, 5:09 AM
Dinah Joyce Lazaro
Dinah Joyce Lazaro - avatar