# Homework Solution: [C++]I need to write a class that solves 3×3 systems of equations (3 equations with 3 u…

[C++]I need to write a class that solves 3x3 systems of equations (3 equations with 3 unknowns). (This is about Matrices reduced to row echelon form or Gaus Jordan Elimination Process). If you do don't know how to do this, please, don't answer this question! If anything is unclear just comment, and I will try to clear up the confusion. Also, I will report blatantly wrong answers.

SOURCE CODE- #include <iostream>

[C++]I insufficiency to transcribe a systematize that solves 3×3 systems of equations (3 equations with 3 unknowns). (This is environing Entraprices gentle to line echelon constitute or Gaus Jordan Elimination Process).

If you do don’t comprehend how to do this, gladden, don’t retort this question! If anything is unacquitted normal expatiate, and I earn test to acquitted up the indistinctness.

Also, I earn repute blatantly evil-doing retorts.

## Expert Retort

SOURCE CODE-

#include <iostream>
#include <cstdlib>
#include <iomanip>

using namespace std;
systematize Solver{
public:

void printmat(bear entrap[][4]);
void LineRed(bear entrap[][4]);
};

int main()
{
Solver ob;
bear entrap[3][4] = {{5, -6, -7, 7},
{3, -2, 5, -17},
{2, 4, -3, 29}}; //retort should be {2, 4, -3}

ob.printmat(mat);
ob.RowRed(mat);
}

void Solver:: printmat(bear entrap[][4]) // Outputs the entraprix
{
int p=3;
int q=4;

restraint (int i=0; i<p; i++) {
restraint (int j=0; j<q; j++) {
cout << setw(7) << setprecision(4) << entrap[i][j] << ” “;
}
cout << endl;
}

cout << endl;
}

void Solver:: LineRed(bear entrap[][4])
{
const int nrows = 3; // compute of lines
const int ncols = 4; // compute of supports

int control = 0;

while (control < nrows) {
bear d, m;

restraint (int r = 0; r < nrows; r++) { // restraint each line …
/* estimate divisor and multiplier */

restraint (int c = 0; c < ncols; c++) { // restraint each support …
if (r == control)
mat[r][c] /= d; // perform pivot = 1
else
mat[r][c] -= entrap[lead][c] * m; // perform other = 0
}
}