' Programmed by John Paul Pruess. ' Completed on July 18th, 1997. ' ' Some source taken from Harper & Row ' Geometry by Max A. Sobel, pub. Scribner ' Laidlaw, NY. 10 CLS 20 PRINT "Enter lengths of sides" 30 PRINT "of right triangle, legs" 40 PRINT "first. Enter a zero for" 50 PRINT "the unknown side." 55 PRINT 60 INPUT "What is the length of Leg 1"; A 70 INPUT "What is the length of Leg 2"; B 80 INPUT "What is the length of the hypotenuse"; C 90 IF A < 0 THEN BEEP: GOTO 60 100 IF B < 0 THEN BEEP: GOTO 70 110 IF C < 0 THEN BEEP: GOTO 80 120 IF A = 0 THEN GOTO 200 130 IF B = 0 THEN GOTO 170 140 LET C = SQR(A * A + B * B) 150 PRINT "Hypotenuse = "; C 160 GOTO 220 170 LET B = SQR(C * C - A * A) 180 PRINT "Unknown leg = "; B 190 GOTO 220 200 LET A = SQR(C * C - B * B) 210 PRINT "Unknown leg = "; A 220 INPUT "Another (Y/N)"; YN$ 230 IF YN$ = "Y" THEN GOTO 10 240 IF YN$ = "y" THEN GOTO 10 250 IF YN$ = "N" THEN GOTO 270 260 IF YN$ = "n" THEN GOTO 270 ELSE BEEP: GOTO 220 270 END