直接上代码吧,就一百多行
/*************************
* 2020.10.17
* 列主元 Gauss消去法
*************************/
#include <iostream>
#include <math.h>
#include <iomanip>
using namespace std;
#define M 9
#define N 9
int main()
{
int i = 0, j = 0, k = 0, t = 0;
float matrix[M][N + 1] = {
0 }, result[M] = {
0 }, solution[M] = {
0 };
float max = 0;
cout << "Enter the value of the matrix: " << endl;
for (i = 0;i < M;i++)
{
for (j = 0;j < N;j++)
cin >> matrix[i][j];
}
cout << "Matrix: " << endl;
for (i = 0;i < M;i++