8-Bit Software Online Conversion
Alex Whitehead Menu - Listing
10MODE7
20PRINT"
30PRINT" ¶¶¶¶¶ ¶¶ ¶¶ ¶¶ "
40PRINT" ¶¶ ¶¶ ¶¶ ¶¶ ¶¶ "
50PRINT" ¶¶¶¶¶ ¶¶ ¶¶ ¶¶ "
60PRINT" ¶¶ ¶¶ ¶¶ ¶¶ ¶¶ "
70PRINT" ¶¶ ¶¶ ¶¶¶¶¶¶ "
80PRINT"
90PRINT" ALEX WHITEHEAD SOFTWARE"
100 PRINT''CHR$(141)" MENU"
110PRINTCHR$(141)" MENU"
120PRINT
130PRINT
140PRINTCHR$(141)"1) Soh Cah Toa"
150PRINTCHR$(141)"1) Soh Cah Toa"
160PRINTCHR$(141)"2) Pythagoras"
170PRINTCHR$(141)"2) Pythagoras"
180PRINTCHR$(141)"3) Factors"
190PRINTCHR$(141)"3) Factors"
200A$=GET$
210IF A$="1" THEN PROCsoh
220IF A$="2" THEN MODE1:PROCpythag:MOD
E7
230IF A$="3" THEN PROCfactors
240RUN
250DEFPROCsoh
260CLS
270PRINTCHR$(141)" Soh Cah Toa"
280PRINTCHR$(141)" Soh Cah Toa"
290PRINT" ==========="
300 INPUT"DO YOU WANT TO KNOW A)THE AN
GLE OR B)A SIDE
?" AS$
310INPUT"DO YOU KNOW OR NEED TO KNOW T
HE HYPOTENUSE?" HYP$
320INPUT"DO YOU KNOW OR NEED TO KNOW T
HE OPPOSITE?"OPP$
330INPUT"DO YOU KNOW OR NEED TO KNOW T
HE ADJACENT?"ADJ$
340 IF AS$="B" AND HYP$="Y" AND OPP$="
Y" THEN PROCSIN
350IF AS$="B" AND HYP$="Y" AND ADJ$="Y
" THEN PROCCOS
360 IF AS$="B" AND OPP$="Y" AND ADJ$="
Y" THEN PROCTAN
370 IF AS$="A" AND OPP$="Y" AND HYP$="
Y" THEN PROCSINANG
380 IF AS$="A" AND HYP$="Y" AND ADJ$="
Y" THEN PROCCOSANG
390 IF AS$="A" AND OPP$="Y" AND ADJ$="
Y" THEN PROCTANANG
400 Z=GET
410ENDPROC
420 REM*******************************
430DEF PROCSIN
440INPUT"DO YOU KNOW A)HYPOTENUSE OR B
)OPPOSITE?" A$
450IF A$="A" THEN INPUT"WHAT IS IT?"HY
:B$="A" ELSE INPUT"WHAT IS IT?"OP :B$="
B"
460 INPUT"ANGLE?"AN
470 AN=RAD(AN)
480IF B$="A" THEN ANSWER= SIN(AN)*HY
490IF B$="B" THEN ANSWER=OP/SIN(AN)
500PRINT ANSWER
510 ENDPROC
520DEF PROCCOS
530INPUT"DO YOU KNOW A)HYPOTENUSE OR B
)ADJACENT?" A$
540IF A$="A" THEN INPUT"WHAT IS IT?"HY
:B$="A" ELSE INPUT"WHAT IS IT?"AD :B$="
B"
550INPUT"ANGLE?"AN
560AN=RAD(AN)
570IF B$="A" THEN ANSWER= COS(AN)*HY
580IF B$="B" THEN ANSWER=AD/COS(AN)
590PRINT ANSWER
600ENDPROC
610DEF PROCTAN
620INPUT"DO YOU KNOW A)OPPOSITE OR B)A
DJACENT?" A$
630IF A$="A" THEN INPUT"WHAT IS IT?"OP
:B$="A" ELSE INPUT"WHAT IS IT?"AD :B$="B
"
640INPUT"ANGLE?"AN
650AN=RAD(AN)
660IF B$="A" THEN ANSWER= OP/TAN(AN)
670IF B$="B" THEN ANSWER= TAN(AN)*AD
680PRINT ANSWER
690ENDPROC
700DEF PROCSINANG
710INPUT"OPPOSIT?"OP
720INPUT"HYPOTENUSE?"HY
730ANSWER=ASN(OP/HY)
740 ANSWER=DEG(ANSWER)
750 PRINT ANSWER
760 ENDPROC
770DEF PROCCOSANG
780INPUT"ADJACENT?"AD
790INPUT"HYPOTENUSE?"HY
800ANSWER=ACS(AD/HY)
810ANSWER=DEG(ANSWER)
820PRINT ANSWER
830ENDPROC
840DEF PROCTANANG
850INPUT"OPPOSITE?"OP
860INPUT"ADJACENT?"AD
870ANSWER=ATN(OP/AD)
880ANSWER=DEG(ANSWER)
890PRINT ANSWER
900ENDPROC
910 DEFPROCpythag
920 PRINT TAB(13,15)"Pythagoras"
930 PRINT TAB(11,17)"By A.Whitehead"
940 FOR T=0 TO 3000:NEXT
950CLS
960 PRINT"PYTHAGORAS"
970VDU5
980MOVE 100,700
990DRAW 100,900
1000DRAW 300,700
1010DRAW 100,700
1020MOVE 240,800
1030PRINT"A"
1040MOVE 180,680
1050PRINT"B"
1060MOVE 60,800
1070PRINT"C"
1080 MOVE 000,500
1090 INPUT"WHICH SIDE DO YOU NEED TO KN
OW?"SIDE$
1100 IF SIDE$="A" THEN PROCSIDEA
1110 IF SIDE$="B" THEN PROCSIDEB
1120 IF SIDE$="C" THEN PROCSIDEC
1130ENDPROC
1140 DEF PROCSIDEA
1150 INPUT"SIDE B?"B:INPUT"SIDE C?"C :
ANS= C^2+B^2
1160 MOVE 000,300
1170 ANSWER = SQR(ANS)
1180 PRINT" A^2 = B^2 + C^2"
1190 PRINT" A=SQR(A^2)"
1200 PRINT "A^2=";B^2;"+";C^2
1210 PRINT" A=SQR(";ANS;")"
1220 PRINT
1230 PRINT"SIDE A = ";ANSWER
1240 A=GET
1250 ENDPROC
1260DEF PROCSIDEB
1270INPUT"SIDE A?"A:INPUT"SIDE C?"C : A
NS= A^2-C^2
1280MOVE 000,300
1290ANSWER = SQR(ANS)
1300PRINT" B^2 = A^2 - C^2"
1310PRINT" B=SQR(B^2)"
1320 PRINT "B^2=";A^2;"-";C^2
1330 PRINT
1340PRINT"SIDE B = ";ANSWER
1350A=GET
1360ENDPROC
1370DEF PROCSIDEC
1380INPUT"SIDE A?"A:INPUT"SIDE B?"B : A
NS=A^2-B^2
1390MOVE 000,300
1400ANSWER = SQR(ANS)
1410PRINT" C^2 = A^2 - B^2"
1420PRINT" C=SQR(C^2)"
1430 PRINT "C^2=";A^2;"-";B^2
1440 PRINT" B=SQR(";ANS;")"
1450 PRINT
1460PRINT"SIDE C = ";ANSWER
1470A=GET
1480ENDPROC
1490 DEFPROCfactors
1500CLS
1510 PRINT:PRINT:PRINT:PRINT:PRINT:PRIN
T:PRINT:PRINT
1520 PRINT CHR$(141)" FACTOR
S"
1530 PRINT CHR$(141)" FACTOR
S"
1540 PRINT
1550 PRINT " BY A.WHITEHEAD"
1560 FOR Z=1 TO 5000:NEXT Z
1570 CLS
1580 T=0
1590INPUT"ENTER No. WHICH YOU WANT TO K
NOW THE"'"FACTORS OF " Fnumber
1600 H=INT(SQR(Fnumber))
1610FOR D=1 TO H
1620 A=Fnumber/D
1630IF INT(A)=A THEN PRINT A" ";D : T
=T+2
1640NEXT D
1650 IF T=2 THEN PRINT Fnumber" Is a PR
IME number"
1660 PRINT"TOTAL FACTORS " T
1670REPEATUNTILGET
1680ENDPROC