triangle TI-83 Source Code - Skip Header

# triangle TI-83 Source Code

This is intended to be the human readable version of the source code for Triangle Information. This version is intended to work only on the TI-83 Texas Instruments graphic calculator. Also available: Documentation about "Triangle Information" and versions of the program for other calculators and in other formats.

Any line that begins with a backslash is a comment and should not be entered into the calculator. (Comments have been colored green) For an authoritative copy of this program's source code that can be imported to the calculator via a computer, consult the text version of Triangle Information source code for the TI-83, along with the character reference. The special character reference also gives an overview of all non-ASCII characters for the calculator, and shows the menus in which they can be found.

 \start83P\ \comment=Program file dated 04/10/96, 18:39\protected=FALSE\name=TRIANGLEClrHome Degree FnOff  LabelOff AxesOff GridOff Horiz ZStandard ZInteger Line(15,15,-15,-15) Line(15,15,45,-15) Line(-15,-15,45,-15) Text(10,42,"A") Text(10,80,"B") Text(23,61,"C") Text(23,41,"E°") Text(23,76,"F°") Text(6,59,"D°") Text(1,1,"TRIANGLE") Disp "ENTER VALUES" Disp "FOR ANY 3, A-F" 0→D 0→E 0→F 0→G 0→H 0→I 0→J 0→K 0→L 0→M 0→O Pause  ClrHome Lbl 1 If D+E+F>180 Goto A If M=3 Goto 8 Menu("ENTER ANY THREE","SIDE A",2,"SIDE B",3,"SIDE C",4,"ANGLE D",5,"ANGLE E",6,"ANGLE F",7) Lbl 2 Prompt A If G=0 1+M→M 1→G Goto 1 Lbl 3 Prompt B If H=0 1+M→M 1→H Goto 1 Lbl 4 Prompt C If I=0 1+M→M 1→I Goto 1 Lbl 5 Prompt D If J=0 1+M→M 1→J Goto 1 Lbl 6 Prompt E If K=0 1+M→M 1→K Goto 1 Lbl 7 Prompt F If L=0 1+M→M 1→L Goto 1 Lbl 8 If GJH=1 Then √((A²+B²-2ABcos(D)→C cos-1(((B²+C²-A²)/(2BC))→F 180-D-F→E Goto 9 End If HLI=1 Then √((B²+C²-2BCcos(F)→A cos-1(((C²+A²-B²)/(2CA))→E 180-F-E→D Goto 9 End If IKG=1 Then √((C²+A²-2CAcos(E)→B cos-1(((A²+B²-C²)/(2AB))→D 180-E-D→F Goto 9 End If GHI=1 Then If (A+B>C)(B+C>A)(C+A>B)=0 Goto A cos-1(((A²+B²-C²)/(2AB))→D cos-1(((A²+C²-B²)/(2AC))→E 180-E-D→F Goto 9 End If JHL=1 Then 180-D-F→E Bsin(D/sin(E→C Bsin(F/sin(E→A Goto 9 End If LIK=1 Then 180-F-E→D Csin(F/sin(D→A Csin(E/sin(D→B Goto 9 End If KGJ=1 Then 180-E-D→F Asin(E/sin(F→B Asin(D/sin(F→C Goto 9 End If KLH=1 Then 180-E-F→D Bsin(D/sin(E→C Bsin(F/sin(E→A Goto 9 End If LJG=1 Then 180-F-D→E Asin(E/sin(F→B Asin(D/sin(F→C Goto 9 End If JKI=1 Then 180-D-E→F Csin(F/sin(D→A Csin(E/sin(D→B Goto 9 End If LKG=1 Then 180-F-E→D Asin(D/sin(F→C Asin(E/sin(F→B Goto 9 End If JLI=1 Then 180-D-F→E Csin(E/sin(D→B Csin(F/sin(D→A Goto 9 End If KJH=1 Then 180-E-D→F Bsin(F/sin(E→A Bsin(D/sin(E→C Goto 9 End If HGK=1 Then B→H A→G E→K Asin(E/B→N If abs(N>1 Goto A sin-1(N→F 180-F→L 180-E-F→D 180-E-L→J √((A²+B²-2ABcos(D)→C √((A²+B²-2ABcos(J)→I If J>0 1→O Goto 9 End If GIL=1 Then A→G C→I F→L Csin(F/A→N If abs(N>1 Goto A sin-1(N→D 180-D→J 180-F-D→E 180-F-J→K √((C²+A²-2CAcos(E)→B √((C²+A²-2CAcos(K)→H If K>0 1→O Goto 9 End If IHJ=1 Then C→I B→H D→J Bsin(D/C→N If abs(N>1 Goto A sin-1(N→E 180-E→K 180-D-E→F 180-D-K→L √((B²+C²-2BCcos(F)→A √((B²+C²-2BCcos(L)→G If L>0 1→O Goto 9 End If GHL=1 Then A→G B→H F→L Bsin(F/A→N If abs(N>1 Goto A sin-1(N→E 180-E→K 180-F-E→D 180-F-K→J √((B²+A²-2BAcos(D)→C √((B²+A²-2BAcos(J)→I If J>0 1→O Goto 9 End If IGJ=1 Then C→I A→G D→J Asin(D/C→N If abs(N>1 Goto A sin-1(N→F 180-F→L 180-D-F→E 180-D-L→K √((A²+C²-2ACcos(E)→B √((A²+C²-2ACcos(K)→H If K>0 1→O Goto 9 End If HIK=1 Then B→H C→I E→K Csin(E/B→N If abs(N>1 Goto A sin-1(N→D 180-D→J 180-E-D→F 180-E-J→L √((C²+B²-2CBcos(F)→A √((C²+B²-2CBcos(L)→G If L>0 1→O Goto 9 End If JKL=1 Then If D+E+F≠180 Goto A End Disp "SORRY,","I CAN NOT HELP" Goto Θ Lbl 9 If O=1 Text(13,1,"POSS 1" Text(24,1,"SIDES=") Disp A Disp B Disp C Output(1,1,"A=") Output(2,1,"B=") Output(3,1,"C=") Pause  Text(24,1,"ANGLES=") Disp D Disp E Disp F Output(1,1,"D=") Output(2,1,"E=") Output(3,1,"F=") If O=0 Goto Θ Pause  Text(13,1,"POSS 2" Text(24,1,"SIDES=       " Disp G Disp H Disp I Output(1,1,"A=") Output(2,1,"B=") Output(3,1,"C=") Pause  Text(24,1,"ANGLES=" Disp J Disp K Disp L Output(1,1,"D=") Output(2,1,"E=") Output(3,1,"F=") Goto Θ Lbl A Disp "IMPOSSIBLE" Lbl Θ Pause  ZPrevious AxesOn Full Stop COPYRIGHT STEPHEN OSTERMILLER 1996 \stop83P\