ooo, that may be it.

I now have

Code:

if (i==0 && j==0)
{
m= (matrix[1][1]) * (matrix[2][2]);
Min_Det = (matrix[1][1]) * (matrix[2][2]) - (matrix[2][1]) * (matrix[1][2]);
}
else if (i==0 && j==1)
{
Min_Det = (matrix[1][0] * matrix[2][2]) - (matrix[2][0] * matrix[1][2]);
}
else if (i==0 && j==2)
{
Min_Det = (matrix[1][0] * matrix[2][1]) - (matrix[2][0] * matrix[1][1]);
}
else
{
Min_Det =999;
}

and get

Code:

|1.0000 0.0000 0.0000 |
|0.0000 2.0000 0.0000 |
|0.0000 0.0000 1.0000 |
Min_Det = -NaN
matrix[1][1]*matrix[2][2] is 0.000000
Determinant = 999.000000