# http://www.ex-parrot.com/~tom/calcs/calcs/encyc/progs/src/pythag.ctf # ======================================================================== # Program name: Pythagorean Theorem # # Version: 1.0 # Author: Clifford Barnes # Date: April 1999 # Models: 9750, 9850, 9950 # # # Description: # # This program solves for A, B, and C in the formula A^2+B^2=C^2 # (This program is good for Algebra and Geometry students.) # @@ Program "PYTHAG" Lbl 1: "A\^2+B\^2=C\^2" ; \^2 represents the squared symbol "TO SOLVE FOR:" "A-PRESS 1" "B-PRESS 2" "C-PRESS 3": ? -> A Goto 6 Lbl 2: If A=2 Then Goto 7 Else Goto 3 Lbl 3: If A=3: Then Goto 8 Else Goto 1 Lbl 6: If A=1: Then Goto 9 Else Goto 2 Lbl 9: ClrText "A\^2+B\^2=C\^2" "B=" ?-> B "C=" ?-> C (C\^2-B\^2)->D \sqrt D -> D ; \sqrt means the square root button on the calculator. ClrText "A=": Locate 4, 1, D Stop Lbl 7: ClrText "A\^2+B\^2=C\^2" "A=" ?-> E "C=" ?-> F (F\^2-E\^2) ->G \sqrt G -> G ClrText "B=": Locate 4, 1, G Stop Lbl 8: ClrText "A\^2+B\^2=C\^2" "A=" ?-> H "B=" ?-> I (H^2+I^2)-> J \sqrt J -> J ClrText "C=": Locate 4, 1, J Stop # ======================================================================== # CTF compliant. See http://www.york.ac.uk/~tw104/casio/ for details. # # More programs and information at: # http://www.ex-parrot.com/~tom/calcs/calcs/encyc/ # # This file last compiled: Friday, 30 April, 1999 # ========================================================================