Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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!!!

*** Whatever program i gave above that only for reference...to follow the style...i asked this questions already 3 times...someon gave wrong ans without any comments first and then someone just copy and paste my referral program!!!!!! Please this time, someone answered it right with all the given requirement please!!!!!

Thank you.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Graph Databases In Action

Authors: Dave Bechberger, Josh Perryman

1st Edition

1617296376, 978-1617296376

More Books

Students also viewed these Databases questions