XY-QUAD

Program returns the quadratic function given by three points.

Source code (286 B)


GOSUB 2
F=X
H=Y
GOSUB 2
J=X
L=Y
GOSUB 2
GOSUB 1
K=1(XX
F=1(F-KFFX
G=1-FFK
C=L-KYJJ-F(J-KJJX)(H-KFFY))(1-KJJ-JFG(1-KJX
B=F(H-KFFY-CG
A=K(Y-C-BX
PRINT A
WAIT
GOSUB 1
PRINT B
WAIT
GOSUB 1
PRINT C
END
LABEL 1
CLRT
PRINT" Y=AX2+BX+C
RETURN
LABEL 2
GOSUB 1
INPUT X
GOSUB 1
INPUT Y
RETURN