+ 2

have a question

how get the sum of arr[i][j] for each line?

10th Jun 2018, 4:28 PM
Gayane Gulkanyan
Gayane Gulkanyan - avatar
1 Odpowiedź
0
Considering no of i values = len1 And no of j values = len2 int sum=0; for (int i=0;i<len1;i++) { for(int j=0;j<len2;j++) { sum+= arr[i] [j] ; } }
13th Feb 2020, 9:31 PM
Deepraj Baidya
Deepraj Baidya - avatar