0

Can you describe why the answer is 58 the every steps?

#include <stdio.h> main() { int a[4][4]={{1,2,-3,-4},{0,-12,-13,14},{-21,23,0,-24},{-31,32,-33,0}}; int i, j, s=0; for (i=0; i<4; i++) { for (j=0; j<4; j++) { if (a[i][j] < 0) continue; if (a[i][j] == 0) break; s += a[i][j];} } printf("%d\n", s); }

9th Dec 2019, 7:37 AM
Naem Azam
Naem Azam - avatar
3 ответов
+ 2
use the open and closing curly bracket when writing for, while, if that was the problem in you other post, since your a beginner use em always, and put your code on code playground then link it here, not every use will like to read an unformatted code
9th Dec 2019, 7:53 AM
✳AsterisK✳
✳AsterisK✳ - avatar
+ 1
Ok
9th Dec 2019, 7:55 AM
Naem Azam
Naem Azam - avatar