[previous_group] * [up] * [next_group]

Linear Equation Solver Specification

Task: Solving Two Equations in Two Unknowns

Write a menu driven program to solve systems of 2 linear equations in 2 unknowns. The equations are of the form:
     a      * x  + a      * x  = c 
      (1,1)    1    (1,2)    2    1

     a      * x  + a      * x  = c 
      (2,1)    1    (2,2)    2    2

Where the a's and c's are the coefficients and right-hand-sides to be input, and x1 and x2 are the unknowns to be determined by the program.

The menu should allow the following commands:

* (G)et Equations:
The user should be prompted to enter the coefficients and right-hand-sides for the two equations.
* (D)isplay Equations:
The equations should be displayed in a nice readable form.
* (S)olve Equations:
The equations should be solved for the unknowns, x1 and x2.
* (P)rint Solution:
The solutions should be displayed in a nice readable form.
* (V)verify Solution:
The solutions should be plugged into the equations and verified that the left-hand-side equals the right-had-side to within some predetermined margin of error.
* (N)ew Error:
The user should be prompted to enter a new value for the error margin. If none is entered, the default 0.00001 should be used.
* (H)elp:
Print a list of commands available and a brief description of each.
* (Q)uit:
Terminate the program.

We should make this program as "robust" as possible; i.e. we should be able to tolerate user mistakes and take some corrective action.

Where do we begin?

[next_group]