0
int [ ] myArr = {6, 42, 3, 7}; int sum=0; for(int x=0; x<myArr.length; x++) { sum += myArr[x]; } System.out.println(sum)
can any one explain the flow?
3 Respostas
+ 2
58
+ 1
58
+ 1
it gives the sum of the array elements the answer is 58
can any one explain the flow?