Question: In this project, you are required to implement a system of linear equations solver based on Cramer's Rule in MIPS assembly language using MARS simulator.

In this project, you are required to implement a system of linear equations solver based on Cramer's Rule in MIPS assembly language using MARS simulator.
To refresh your memory about Cramer's rule, check this website: Cramer's rule (math.net)
Here are the specifications of the solver you are required to implement:
1. For simplicity, your solver supports systems of linear equations with two or three variables only
2. The linear equations are read from an input text file.
3. The program should prompt the user to enter the input file name or path
4. The input file can contain multiple systems of linear equations separated by empty lines
5. The program should validate the input file and the structure of the systems of the linear equations, and print the appropriate error messages, when required
6. The menu should remain in an infinite loop until the user decides to exit by entering 'e' or 'E'
7. The program prompts the user to choose how they would like the results to be displayed: either in an output text file or on the screen
a. If the user enters ' f ' or '\( F \)', then the results will be saved to an output text file
b. If the user enters 's' or 'S', then the results will be printed on the screen
c. If the user enters anything else, an invalid input error message is display on the screen.
8. Solutions for different systems of equations can be separated by empty lines
Example:
Given the following snapshot of the input text file
\[
\begin{array}{l}
2 x+3 y+z=5\\
4 x+2 y+2 z=8\\
x+y+2 z=6\\
x+y=5\\
2 x+y=10
\end{array}
\]
Then the output should be as follows
\[
\begin{array}{l}
\mathrm{X}=1/2\\
\mathrm{Y}=1/2\\
\mathrm{Z}=5/2
\end{array}
\]
\[
\begin{array}{l}
X=5\\
Y=0
\end{array}
\]....full complete run code
In this project, you are required to implement a

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