D. JacKaL's Pythagorean Theorem
This is a Pythagorean Theorem program that allows you to either solve for a side of a right
triangle (A or B) or the hypotenuse of a triangle (C). All you have to do is enter the 2 sides
you know, and it will tell you the length of the other side.
/START80/
/NAME=PYTHAG
:LBL 1
:CLRHOME
:DISP "SOLVE FOR:","1:C","2:A OR B"
:INPUT X
:IF X<1
:GOTO 1
:IF X>2
:GOTO 1
:IF X-INT X
:GOTO 1
:CLRHOME
:IF X=1
:THEN
:INPUT "A=",A
:INPUT "B=",B
:\sqrt\(A\^2\-B\^2\)->C (these are the square root and squared signs)
:DISP "","C=",C
:ELSE
:INPUT "C=",C
:INPUT "B OR A=",B
:\sqrt\(C\^2\-B\^2\)->A
:DISP "","A OR B=",A
:END
:PAUSE
:LBL Q
:CLRHOME
:DISP "ANOTHER?","1:YES","2:NO"
:INPUT Q
:IF Q=1
:GOTO 1
:IF Q-2
:GOTO Q
:CLRHOME
/STOP80/