Hey, I've got this code that scans a 3x3 section of a 9x9 array. Heres the code:
for (j=x; j<x+3; j++)
{
for (i=y; i<y+3; i++)
{
if (array[i][j] == value)
{
cout<< "Number already used in Section" << endl;
}
}
}
It works fine if you start from the top left corner of a section since it will search the within the 3x3, but anywhere else it will obviously add 3 to the coordinate you entered and will take the section as being part of a different section if that makes any sense. Not sure how to get around this, any help?