I have a problem with this program
normally,i should have something after treatement like that
4 -0.25 0.25
-0.25 4 0.75
0.25 0.75 1
but the program show
4.00 -0.25 0.25
-0.25 4.25 0.65
0.25 0.65 3.5
I don't konw where is the mistake
Any help please
int i,k,p;
float R[N],D[N][N];
for(k=1;k<4;k++)
{
for(p=1;p<4;p++)
{
R[p]=D[p][p]*A[p][k];
A[k][k]=A[k][k]-A[k][p]*R[p];
}
for(i=k+1;i<4;i++)
{
for(p=1;p<k;p++)
{
A[i][k]=A[i][k]-A[i][p]*R[p];
}
}

New Topic/Question
Reply



MultiQuote




|