for (row=0; row<8; row++)
{
for (col=0; col<8; col++)
{
answer+=my_data[row][col];
}
printf("The sum of row %i is: %i\n", row,answer);
answer = 0;//to reset answer back to zero for next row sum
}
I have an 8x8 array and I'm adding each row and resetting the answer back to zero so you get the exact answer for each row. However it's not working... What is wrong?
answer = 0;to the start of the bucle?