Answer the question
In order to leave comments, you need to log in
How to loop through sums of elements line by line?
There is some 3x3 array (although it can be of any size). It is necessary to calculate the sums of elements in rows, for example:
1 2 3
4 5 6
7 8 9
summ1 = 1 + 5 + 9 (i.e. 1 element is skipped in the second row and the first and second in the third)
summ2 = 1 + 6 + 8
summ3 = 2 + 4 + 9
summ4 = 2 + 6 + 7
...
Is there a function to do this? Well, or push the idea of \u200b\u200bhow to do it yourself.
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question