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.

MULTDIV

From CoCopedia - The Tandy/Radio Shack Color Computer Wiki
Jump to navigation Jump to search
100 DIM LM(5,2), MS$(5)
110 DATA 0,9,10,99,100,999,1000,9999,10000,99999
120 DATA "GOOD WORK!","KEEP IT UP!","NICE GOING!","YOU'RE DOING GREAT"
130 DATA "FANTASTIC!"
140 FOR T=1 TO 5
150 READ LM(T,1), LM(T,2): NEXT T
160 FOR T=1 TO 5
170 READ MS$(T): NEXT T
180 CLS
190 PRINT@1,"MULTIPLICATION/DIVISION PROGRAM"
200 PRINT@64,"SELECT ONE OF THE FOLLOWING:"
210 PRINT@96,"A. MULTIPLICATION"
220 PRINT@128,"B. DIVISION"
230 PRINT@160,"WHICH ONE";: INPUT AS
240 IF A$="A" THEN 290
250 IF A$="B" THEN 430
260 PRINT@224,"INVALID SELECTION--TRY AGAIN"
270 FOR T1 TO 300: NEXT T
280 PRINT@224,"";: PRINT: PRINT@171,"": GOTO230
290 REM MULTIPLICATION
300 C=1: T1=0: T2=0
310 IF C<3 THEN D=1: GOTO330
320 D=C-1
330 A1=RND(LM(C,2)): A2=RND(LM(D,2))
340 IF (A1<LM(C,1)) OR (A2<LM(D,1)) THEN 330
350 A3=A1*A2
360 B$=STR$(A1): C$=STR$(A3): D$=STR$(A2)
370 CLS
380 PRINT@9,"MULTIPLICATION": PRINT@166,"*"
390 PRINT@135,A1: PRINT@167+(LEN(B$)-LEN(D$)),A2
400 PRINT@198,"-------"
410 PRINT@230(LEN(C$)-LEN(B$))";: INPUT T
420 GOSUB570: GOTO310
430 REM DIVISION
440 C=1: T1=0: T2=0
430 IF C<3 THEN D=1: GOTO470
460 D=C-1
470 A1=RND(LM(C,2)): A2=RND(LM(D,2))
480 IF (A1<LM(C,1)) OR (A2<LM(D,1)) OR (A1<A2) THEN 470
490 A3=INT(A1/A2)
500 R1=A1-(A2*A3)
510 CLS
520 PRINT@12,"DIVISION"
530 PRINT@161,A1 ;"/";A2
540 PRINT@173,"Q=";: INPUT T
530 PRINT@207,"R=";: INPUT R
560 GOSUB570: GOTO450
570 REM PRINT SUBROUTINE
580 T2=T2+1
590 IF A$="B" THEN 620
600 IF T=A3 THEN 640
610 PRINT@320,"WRONG! THE ANSWER IS";A3; GOTO670
620 IF (T=A3) AND (R=R1) THEN 640
630 PRINT@320,"WRONG! ANSWER IS Q";A3;"R";R1: GOTO670
640 T1=T1+1
630 IF ((T2/10)=INT(T2/10)) AND ((T1/T2)>.60) THEN PRINT@238,MS$(C)
660 PRINT@320,"CORRECT!";T1;"OUT OF";T2
670 PRINT@384,"ENTER H FOR HARDER, E FOR"
680 PRINT@416,"EASIER, R FOR RESTART, OR"
690 PRINT@448,"JUST <ENTER> FOR SAME";: INPUT B$
700 IF B$="R" THEN 180
710 IF B$="" THEN 750
720 IF (B$="E") AND (C>1) THEN C=C-1: GOTO750
730 IF (B$="H") AND (C<3) THEN C=C+1: GOTO750
740 GOTO670
730 RETURN