求助c语言高手 急!!急!!急!!

来源:百度知道 编辑:UC知道 时间:2024/05/08 04:32:20
如何用c语言编写高斯约化法,谢谢谢
我加了30分,真的很急,要能运行,能求逆,明早10点了,谢谢,也叫高斯——约旦消去法

消元?
没有直接用矩阵运算来的方便啊

#include <stdio.h>
#include <malloc.h>

void main( void )
{
float *buffer,*p; //定义数组首地址指针变量
short int row,num; //定义矩阵行数row及矩阵元素个数
short int i,j;
float determ; //定义矩阵的行列式

float comput_D(float *p,short int n); //求矩阵的行列式
float Creat_M(float *p, short int m,short int n,short int k); //求代数余子式
void Print( float *p,short int n); //打印n×n的矩阵

printf("\nPlease input the number of rows: ");
scanf("%d",&row);

num=2 * row * row;
buffer = (float *)calloc(num, sizeof(float)); //分配内存单元

p=buffer;
if(p != NULL)
{
for(i=0;i<row;i++) //输入各单元值
{
printf("Input the number of %d row ",i+1);
for(j=0;j<row;j++)
{