3_EQUAT

Program solves the set of 3 linear equations in a ax+by+cz=d form. You have to enter the a,b,c,d coeficients.
Note: in the first entered equation, the a value can't be zero (you may change the order of the equations).

Source code (371 B)


GOSUB 1
PRINT"1.EQUATION
GOSUB 2
PRINT"1.EQUATION
E=A
F=B
G=C
H=D
GOSUB 2
PRINT"3.EQUATION
I=A
J=B
K=C
L=D
GOSUB 2
F=F-EBA
G=G-ECA
H=H-EDA
J=J-IBA
Z=L-IDA-JHF)(K-ICA-JGF
Y=H-GZ)F
X=D-CZ-BY)A
PRINT X
WAIT
GOSUB 1
PRINT Y
WAIT
GOSUB 1
PRINT Z
END
LABEL 1
CLRT
PRINT" AX+BY+CZ=D
RETURN
LABEL 2
sin sin 5
GOSUB 1
INPUT A
GOSUB 1
INPUT B
GOSUB 1
INPUT C
GOSUB 1
INPUT D
GOSUB 1
RETURN