### [41C] Linear Equations Solver for two Unknown

Posted:

**Sat Jun 29, 2019 11:05 pm**What it is? It is a linear equations solver.

What does it do? It solves a system of two linear equations containing the same set of variables.

At startup the program "a=?" is queried, i.e. you have to enter a11.

R/S, "b=?" is prompted, you must enter a12.

R/S, "res=?" is prompted, you must enter b1.

R/S → a21 for "a=?", R/S → a22 for "b=?", R/S → b2 for "res=?".

As you can see, improvements are possible for the input of variables, to be more precise.

R/S, you get "X=...." representing x1.

R/S, you get "Y=...." representing x2.

There is no use for this program if you have a calculator with matrix. But the DM41(L) has no MathPac installed.

(1982/1983, 2019)

Possibly this was general knowledge.

Listing:

What does it do? It solves a system of two linear equations containing the same set of variables.

At startup the program "a=?" is queried, i.e. you have to enter a11.

R/S, "b=?" is prompted, you must enter a12.

R/S, "res=?" is prompted, you must enter b1.

R/S → a21 for "a=?", R/S → a22 for "b=?", R/S → b2 for "res=?".

As you can see, improvements are possible for the input of variables, to be more precise.

R/S, you get "X=...." representing x1.

R/S, you get "Y=...." representing x2.

There is no use for this program if you have a calculator with matrix. But the DM41(L) has no MathPac installed.

(1982/1983, 2019)

Possibly this was general knowledge.

Listing:

Code: Select all

```
LBL "GLG 2 U"
1.006
STO 00
LBL 00
"a=?"
PROMPT
STO IND 00
ISG 00
"b=?"
PROMPT
STO IND 00
ISG 00
"RES=?"
PROMPT
STO IND 00
ISG 00
GTO 00
RCL 01
ST/ 02
ST/ 03
RCL 02
RCL 04
*
ST- 05
RCL 03
RCL 04
*
ST- 06
RCL 05
ST/ 06
RCL 02
RCL 06
*
ST- 03
SF 21
"X="
ARCL 03
AVIEW
"Y="
ARCL 06
AVIEW
END
```