J
John Smith
Why in the printout of the following code s, t, and u only go up
to 9 but w and x 10? I would think they would at least go up to
the same number, be it 9 or 10.
The last line of the printout is:
column 9 row 9 u 9 v 0 w 10 x 10 y 1 z 48652
-----------------------------------------
for(s = 0; s < 9; s++)
for(t = 0; t < 9; t++)
for(u = 0; u < 9; u++)
{
if(v = Cell[t].GetElement(u) != 0)
for(w = 0; w < 9; w++)
{
if(w != t)
{
for(x = 0; x < 9; x++)
{
if(y = Cell[w].GetElement(x) != 0)
if(v >= y)
if( v == y)
{
z++;
}
}
}
}
cout << "column " << s+1 << " row " << t+1 << \\
" u " << u+1 << " v " << v << " w " << w+1 << " x " << x+1 \\
<< " y " << y << " z " << z << '\n';
}
to 9 but w and x 10? I would think they would at least go up to
the same number, be it 9 or 10.
The last line of the printout is:
column 9 row 9 u 9 v 0 w 10 x 10 y 1 z 48652
-----------------------------------------
for(s = 0; s < 9; s++)
for(t = 0; t < 9; t++)
for(u = 0; u < 9; u++)
{
if(v = Cell
for(w = 0; w < 9; w++)
{
if(w != t)
{
for(x = 0; x < 9; x++)
{
if(y = Cell
if(v >= y)
if( v == y)
{
z++;
}
}
}
}
cout << "column " << s+1 << " row " << t+1 << \\
" u " << u+1 << " v " << v << " w " << w+1 << " x " << x+1 \\
<< " y " << y << " z " << z << '\n';
}