MediaWiki:Sitenotice:
2025-12-29: I have restored the wiki to a backup from the end of November. Starting in September 2025, accesses went form the 800MB-1.2GB range per month to 26GB in September, 42GB in October, and 70GB in November with most accesses originating from China. As soon as I realized what was causing all the access problems in November, I shut it down (it had reached 36GB by then) behind a password/login screen. The database had gotten corrupted, and I tried a restore from just before the spike in access but that didn't work. Thus, end of November. I still have the other daily backups so if there were any important additions in December, let me know and maybe they can be recovered. - Allen H.

TRIG2

From CoCopedia - The Tandy/Radio Shack Color Computer Wiki
Revision as of 21:38, 10 September 2015 by Polluks (talk | contribs) (Category)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
100 DIM AG(2), SD(3)
110 CLS: PRINT@4,"TRIGONOMETRIC FUNCTIONS"
120 PRINT@99,"QUIZ GIVEN ONE SIDE AND"
130 PRINT@131,"AND ONE ANGLE):"
140 PRINT@262,CHR$(136);: REM--DRAW TRIANGLE
150 PRINT@386,CHR$(136)+" "+CHR$(136);
160 FOR I=387 TO 389
170 PRINT@I,CHR$(140);: NEXT I
180 FOR I=294 TO 358 STEP 32
190 PRINT@I,CHR$(138);: NEXT I
200 FOR I=293 TO 355 STEP 31
210 PRINT@I,CHR$(137);: NEXT I
220 PRINT@385,"A";: PRINT@391,"C";
230 PRINT@231,"B";: PRINT@323,"3";
240 PRINT@327,"1";: PRINT@420,"2";
250 PRINT@237,"SIDE 1=";: PRINT@274,"2=";
260 PRINT@306,"3=";: PRINT@364,"ANGLE A=";
270 PRINT@402,"B=";: PRINT@434,"C= 90"
280 REM -- QUIZ
290 S=RND(3): A=RND(2): REM--SELECT RANDOM SIDE AND ANGLE
300 SD(S)=RND(99): AG(A)=RND(81)+4
310 A$=STR$(SD(S))
320 PRINT@214+(S*32),MID$(A$,2,6)
330 A$=STR$(AG(A))
340 PRINT@342+(A*32),MID$(A$,2,4)
350 REM -- FORMULAS
360 IF A=1 THEN AG(2)=90-AG(1)
370 IF A=2 THEN AG(1)=90-AG(2)
380 IF S<>1 THEN 400
390 SD(2)=SD(1)/TAN(AG(1)/57.2958279): GOTO420
400 IF S<>2 THEN 430
410 SD(1)=SD(2)*TAN(AG(1)/57.2958279)
420 SD(3)=SQR((SD(1)^2)+(SD(2)^2)) : GOTO450
430 SD(2)=SD(3)*COS(AG(1)/57.2958279)
440 SD(1)=SQR((SD(3)^2)-(SD(2)^2))
450 I=0: P=212: REM--QUIZ SIDES
460 IF NOT(I<3) THEN 510
470 I=I+1: IF I=S THEN 460
480 PRINT@P+(I*32),"";: INPUT A$
490 IF (VAL(A$)=<(SD(I)+1)) AND (VAL(A$)=>(SD(I)-1)) THEN 460
500 PRINT@P+(I*32),"": GOTO480
510 I=0: P=340: REM--QUIZ ANGLES
520 IF NOT (I<2) THEN 370
530 I=I+1: IF I=A THEN 570
540 PRINT@P+(I*32),"";: INPUT A$
550 IF (VAL(A$)=<(AG(I)+1)) AND (VAL(A$)=>(AG(I)-1)) THEN 520
560 PRINT@P+(I*32),"": GOTO540
570 PRINT@480,"PRESS R TO RESTART";: A$=INKEY$
580 IF A$="R" THEN 110
590 GOTO570