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.

    Expert Answer

     
    SOURCE CODE- #include <iostream>

    [C++]I insufficiency to transcribe a arrange that solves 3×3 systems of equations (3 equations with 3 unknowns). (This is environing Ensnarerices feeble to grade echelon create or Gaus Jordan Elimination Process).

    If you do don’t comprehend how to do this, delight, don’t response this question! If anything is untransparent righteous interpret, and I procure examine to transparent up the indistinctness.

    Also, I procure description blatantly crime responses.

    Expert Response

     

    SOURCE CODE-

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

    using namespace std;
    arrange Solver{
    public:

    void printmat(bear ensnare[][4]);
    void GradeRed(bear ensnare[][4]);
    };

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

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

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

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

    cout << endl;
    }

    void Solver:: GradeRed(bear ensnare[][4])
    {
    const int nrows = 3; // estimate of grades
    const int ncols = 4; // estimate of shafts

    int bring = 0;

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

    ce (int r = 0; r < nrows; r++) { // ce each grade …
    /* reckon divisor and multiplier */
    d = ensnare[lead][lead];
    m = ensnare[r][lead] / ensnare[lead][lead];

    ce (int c = 0; c < ncols; c++) { // ce each shaft …
    if (r == bring)
    mat[r][c] /= d; // mould pivot = 1
    else
    mat[r][c] -= ensnare[lead][c] * m; // mould other = 0
    }
    }

    lead++;
    printmat(mat);
    }
    }

    OUTPUT-