prog.c: In function 'main':
prog.c:7:21: error: 'n' undeclared (first use in this function)
for(int i = 0; i < n; i++) sum1++; // does not executes sum1 = 0
^
prog.c:7:21: note: each undeclared identifier is reported only once for each function it appears in
prog.c:10:22: error: 'i' undeclared (first use in this function)
for (int j = 0; j < i; j++) sum2++; // doesn't executes.
^