Question: develop your C++ program that can solve (ANY MATRIX) up to 15 equations with 15 unknowns. Your program will be tested with a different matrix

develop your C++ program that can solve (ANY MATRIX) up to 15 equations with 15 unknowns. Your program will be tested with a different matrix than the one given to you. Your program should be able to read in the text file solve the matrix......put the result on the screen as well as write the results to a text file. YOU DONT HAVE TO DO BACK SUBSTITUTION ONLY SOLVE FOR THE VALUE OF ONE VARIBLE.

Here is the data.txt:

2 9 -1 3 0 81 1 2 2 0 -6 -23 5 7 2 -1 3 100 8 -1 -4 -2 9 71 3 3 8 1 9 178 

I did this manually, i got ans: a=5, b=6, c=7, d=8, e=9

But he is going to check with other data too...

* Do not read the data.txt file under int main()

* Use header files #include ,#include ,#include

* my professor is very picky, He only likes program like his way

* i am giving my last program as a reference, so you know what way my professor wants to do the program

using namespace std;

#include //so we can read text files #include //so we can output to the screen #include //so we can compute square root of the argument

ifstream Infile; //declares Infile float Arraything[100], mean, yyy; // declares variables with option for decimal place void CalcMean(); // declares calcmean void CalcStd(); // declares calcstd void getData(); // declares getData int numberofdatapoints; // declares numberofdatapoints as an integer

int main() { getData(); //calls getData function CalcMean(); //calls CalcMean function CalcStd(); // calls CalcStd function system("pause"); return(0); // ends program } void getData() //getData begins { Infile.open("thedata.txt"); // opens specified file numberofdatapoints= 0; // sets numberofdata points to 0 while(!Infile.eof())//tells program to keep reading the file while it performs the following statement { Infile>>Arraything[numberofdatapoints]; // takes information in the file cout<

*** This program just for reference to follow the style of my prof.

I posted this questions couple of days ago, but somebody replied with solution and that solution was not copyable and that does not have any comments. Please comments all the line and make sure i can copy that program. Use header files #include ,#include ,#include ..try to not use any other headerfiles please!!!

Thank you.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!