+ 2
have a question
how get the sum of arr[i][j] for each line?
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] ;
}
}