Hello,
I have this matrix:
0 0 1 0
0 0 1 0
1 1 1 0
0 1 0 0
and I need to print out the block with the coords: (2,1) so in this case:
1 0
1 0
I have tried this:
for(int i=minRow; (i < 2); i++)
{
for(int j=minCol; (j < 2); j++)
{
cout << matrix1[i*2+j] << ' ';
}
cout << endl;
}
As well as this:
for(int i=minRow; (i < 4); i++)
{
for(int j=minCol; (j < 4); j++)
{
cout << matrix1[i*4+j] << ' ';
}
cout << endl;
}
But it doesn't work, does anyone have any suggestions? Thanks :)