~~化简增广矩阵~~怎么出现错误!!求助
急!!!化简增广矩阵~~怎么出现错误!!求助高手
以下是程序>不知道什么地方出错了
#include
#define M 2
#define N 2
main()
{ float a[M][N],b[N],c[M][N+1];
int i,j,k;
printf("请输入系数矩阵:\n");
for(i=0;i
for(j=0;j
scanf("%f",&a[i][j]);
for(i=0;i
{
for(j=0;j
printf("\t%f",a[i][j]);printf("\n");
}
printf("请输入右端项:\n");
for(i=0;i
scanf("%f",&b[i]);
for(i=0;i
printf("\n%f",b[i]);printf("\n");
printf("\n增广矩阵为:\n");
for(i=0;i
for(j=0;j
c[i][j]=a[i][j];
for(i=0;i
c[i][N]=b[i];
for(i=0;i
{ for(j=0;j
printf("\t%f",c[i][j]);printf("\n");
}
for(j=0;j
for(k=j+1;k
for(i=0;i
a[k][i]=a[k][i]*a[j][j]/a[k][j]-a[j][i];
printf("\n化简后的增广矩阵为:\n");
for(i=0;i
{ for(j=0;j
printf("\t%f",a[i][j]);printf("\n");
}
}