+ 3

Help me plz to fill in the blanks to calculate the sum of all elements in the array "arr" using an enhanced for loop

Int res = 0 ___(int el__arr) { res+=___; }

25th Jun 2019, 2:31 PM
Boy Arya
Boy Arya - avatar
1 ответ
+ 10
int res=0; for(int el:arr){ res+=el; }
25th Jun 2019, 2:44 PM
Mritunjay Kumar
Mritunjay Kumar - avatar