1 " "WAIT 90:PRINT "    TRIANGLE SOLUTIONS":PRINT "  Copr. 1982 Tandy Corp."
2 CLEAR :USING :LOCK :X=ASN 1:Y=ACS -1:GOTO 9
3 Z=.5*A*B*SIN F:PAUSE "Area =";Z:GOSUB 600:FOR Z=1TO 6:@(Z)=(INT (@(Z)*1E6+.5)*1E-6):NEXT Z
4 N=(A=B)+(B=C)+(C=A):IF N=3PAUSE "Equilateral":GOSUB 600:GOTO 9
5 IF NPAUSE "Isoscoles":GOSUB 600
6 IF D=XOR E=XOR F=XPAUSE "Right":GOSUB 600:GOTO 8
7 IF D>XOR E>XOR F>XPAUSE "Obtuse":GOSUB 600
8 IF A<>BAND B<>CAND A<>CPAUSE "Scalene":GOSUB 600
9 WAIT 0:PRINT "  SSS SAS ASA 3PT END"
10 Z=ASC INKEY$ -16:IF Z<1OR Z>5THEN 10
11 GOTO 100*Z
100 INPUT "Side A? ";A:IF A>0THEN 120
110 GOTO 100
120 INPUT "Side B? ";B:IF B>0THEN 140
130 GOTO 120
140 INPUT "Side C? ";C:IF C>0THEN 160
150 GOTO 140
160 IF (A>(B+C))OR (B>(A+C))OR (C>(A+B))BEEP 1:PAUSE "NOT A TRIANGLE!":GOSUB 600:GOTO 9
170 D=ACS ((A*A-B*B-C*C)/-2/B/C):PAUSE "Angle A =";D:GOSUB 600:E=ACS ((B*B-C*C-A*A)/-2/A/C)
180 PAUSE "Angle B =";E:GOSUB 600:F=ACS ((C*C-A*A-B*B)/-2/A/B):PAUSE "Angle C =";F:GOSUB 600:GOTO 3
200 INPUT "Side A? ";A:IF A>0THEN 220
210 GOTO 200
220 INPUT "Angle B? ";E:IF E>0AND E<YTHEN 240
230 GOTO 220
240 INPUT "Side C? ";C:IF C>0THEN 260
250 GOTO 240
260 B=SQR (A*A+C*C-(2*A*C*COS E)):PAUSE "Side B =";B:GOSUB 600:D=ASN ((A*SIN E)/B)
270 PAUSE "Angle A =";D:GOSUB 600:F=Y-D-E:PAUSE "Angle C =";F:GOSUB 600:GOTO 3
300 INPUT "Angle A? ";D:IF D>0AND D<YTHEN 320
310 GOTO 300
320 INPUT "Side B? ";B:IF B>0THEN 340
330 GOTO 320
340 INPUT "Angle C? ";F:IF F>0AND F<YTHEN 360
350 GOTO 340
360 E=Y-D-F:PAUSE "Angle B =";E:GOSUB 600:A=(B*SIN D)/SIN E:PAUSE "Side A =";A:GOSUB 600
370 C=(B*SIN F)/SIN E:PAUSE "Side C =";C:GOSUB 600:GOTO 3
400 INPUT "Vertex A X-coord? ";G:GOTO 410
405 GOTO 400
410 INPUT "Vertex A Y-coord? ";H:GOTO 420
415 GOTO 410
420 INPUT "Vertex B X-coord? ";I:GOTO 430
425 GOTO 420
430 INPUT "Vertex B Y-coord? ";J:GOTO 440
435 GOTO 430
440 INPUT "Vertex C X-coord? ";K:GOTO 450
445 GOTO 440
450 INPUT "Vertex C Y-coord? ";L:GOTO 460
455 GOTO 450
460 A=SQR ((I-K)^2+(J-L)^2):PAUSE "Side A =";A:GOSUB 600:B=SQR ((G-K)^2+(H-L)^2)
465 PAUSE "Side B =";B:GOSUB 600:C=SQR ((G-I)^2+(H-J)^2):PAUSE "Side C =";C:GOSUB 600
470 IF A*B*C=0BEEP 1:PAUSE "NOT A TRIANGLE!":GOSUB 600:GOTO 9
475 GOTO 160
500 UNLOCK :END
600 FOR Z=1TO 100:NEXT Z
610 IF INKEY$ <>""THEN 610
620 RETURN 
999 END
