Thanks. The reason I was confused was because the sum=a[i][j] in the for loop. Usually for loop only has a intialization, condition and increment but not the first term. Anyways, thanks !
Type: Posts; User: arbitel
Thanks. The reason I was confused was because the sum=a[i][j] in the for loop. Usually for loop only has a intialization, condition and increment but not the first term. Anyways, thanks !
Can you explain more on that ? Sorry I am new to C++.
So would it be
for (k=i-1; k>=0; k--) {
sum=a[i][j]
sum -= a[i][k];
}
Hi I am not quite sure what this for loop means
for (sum=a[i][j], k=i-1; k>=0; k--) sum -= a[i][k];
Why is there a sum=a[i][j] in the for loop ? Is it initiated every single time or how does...