直接上代码:
#include <stdio.h>
#include <stdlib.h>
int main()
{
int i, j, p, k, q, m;
printf("\n\n\t\t\t 二元域上的线性方程组求解程序\n\n\n\n");
printf("input the size of the matrix:");
scanf("%d", &m);
unsigned int **a = (unsigned int **) malloc(sizeof(unsigned int*) *m);
for(i=0;i<m;i++)//申请存储系数矩阵的动态数组
{
a[i]=(unsigned int *) malloc(sizeof(unsigned int )* (m+1));
}
//unsigned int *b = (unsigned int *) malloc(sizeof(unsigned int)*m );
printf("input the coefficient matrix:\n");
for(i=0;i<m;i++)//从命令行读取矩阵中的元素
{
for(j=0;j<m;j++)
{
scanf("%d", &a[i][j]);
}
}
printf("input the value of the formulas:\n");
for(i=0;i<m;i++)
{
scanf("%d", &a[i][m]);
}
printf("The formula