Home of the original IBM PC emulator for browsers.
1 REM ***ROBERT L.
2 REM ***COPPEDGE
5 FOR SC=1TO32:PRINT:NEXT
10 PRINT"MATH TUTOR":PRINT:PRINT
15 PRINT"THIS TUTOR IS DESIGNED"
18 PRINT"TO BE AN AID IN BASIC"
20 PRINT"MATHEMATICS."
21 PRINT
25 PRINT"YOU HAVE THE FOLLOWING":PRINT"SUBJECTS TO CHOOSE FROM"
28 PRINT
30 PRINT"1) ADDITION":PRINT:PRINT"2) SUBTRACTION":PRINT
35 PRINT"3) MULTIPLICATION":PRINT:PRINT"4) DIVISION"
38 PRINT
40 INPUT "WHICH WOULD YOU LIKE TO DO";X
44 PRINT
45 IF X>4 OR X<1 THEN 40
50 INPUT "ENTER RANDOM SEED(ANY NUMBER)";Z1
55 FOR SC=1TO32:PRINT:NEXT
60 ON X GOTO 100,200,300,400
100 PRINT"THIS IS ADDITION":FOR Z=1 TO 100
105 W=INT(1000*RND(Z1)+1):V=INT(1000*RND(Z1)+1)
110 Y=W+V
111 S=0
115 PRINT:PRINT"WHAT IS:"
120 PRINTW;"+";V:INPUT U
125 IF U=Y THEN 140
126 S=1
130 PRINT:PRINT"NO, I'M SORRY"
135 INPUT "AGAIN";A$:IF A$="YES" OR A$="Y" THEN 115
137 PRINT:PRINT"THE ANSWER IS";Y
138 GOTO 160
140 PRINT:PRINT"VERY GOOD!! PERFECT!!"
145 IF S=0 THEN R(X)=R(X)+1
160 PRINT:INPUT"DO YOU WANT ANOTHER ONE";A$
165 IF A$="YES" OR A$="Y" THEN 180
170 PRINT"YOU GOT ";R(X);" OUT OF ";Z
175 GOTO 500
180 PRINT:PRINT:PRINT:NEXT Z
185 GOTO 170
200 PRINT"THIS IS SUBTRACTION":FOR Z=1 TO 100
205 W=INT(1000*RND(Z1)+1):V=INT(1000*RND(Z1)+1)
210 Y=W-V
211 S=0
215 PRINT:PRINT"WHAT IS:":PRINT
220 PRINTW;"-";V:INPUT U
225 IF U=Y THEN 240
226 S=1
230 PRINT:PRINT"NO, I'M AFRAID THAT'S":PRINT"NOT IT.":PRINT
233 PRINT"DO YOU WANT TO"
235 INPUT"TRY AGAIN";A$:IFA$="Y" OR A$="YES" THEN 215
236 PRINT
237 PRINT"THE ANSWER IS ";Y
238 PRINT:GOTO260
240 PRINT:PRINT"BRAVO!! GOOD JOB!!"
245 IF S=0 THEN R(X)=R(X)+1
250 PRINT
260 INPUT "DO YOU WANT ANOTHER ONE";A$
265 IF A$="YES" OR A$="Y" THEN 280
270 PRINT"YOU GOT ";R(X);" OUT OF ";Z
275 GOTO 500
280 PRINT:PRINT:PRINT:NEXT Z
285 GOTO 270
300 PRINT"THIS IS MULTIPLICATION":FOR Z=1 TO 100
305 W=INT(20*RND(Z1)+1):V=INT(20*RND(Z1)+1)
310 Y=W*V
311 S=0
315 PRINT"WHAT IS:"
318 PRINT
320 PRINTW;"*";V:INPUT U
325 IF Y=U THEN 340
326 S=1
328 PRINT
330 PRINT:PRINT"SORRY, BUT THAT'S NOT":PRINT"CORRECT. ":PRINT
333 PRINT"DO YOU WANT TO TRY"
335 INPUT "AGAIN";A$:IF A$="Y" OR A$="YES" THEN 315
337 PRINT:PRINT"THE ANSWER IS";Y
338 GOTO 360
340 PRINT:PRINT"YOU GOT IT!!"
344 PRINT
345 IF S=0 THEN R(X)=R(X)+1
360 PRINT:INPUT"DO YOU WANT ANOTHER ONE";A$
365 IF A$="Y" OR A$="YES" THEN 380
366 PRINT
370 PRINT"YOU GOT ";R(X);" OUT OF ";Z
375 GOTO 500
380 PRINT:PRINT:PRINT:NEXT Z
385 GOTO 370
400 PRINT"THIS IS DIVISION":FOR Z=1 TO 100
405 W=INT(150*RND(Z1)+1):V=INT(75*RND(Z1)+1)
410 Y=W/V:IF Y=INT(Y) THEN 414
411 GOTO 405
414 S=0
415 PRINT:PRINT"WHAT IS:"
420 PRINTW;"/";V:INPUT U
425 IF Y=U THEN 440
426 S=1
428 PRINT
430 PRINT"NOT QUITE RIGHT. DO YOU":PRINT"WANT ANOTHER CRACK "
435 INPUT "AT IT";A$:IF A$="Y" OR A$="YES" THEN 415
436 PRINT
437 PRINT"THE ANSWER IS: ";Y
438 PRINT:GOTO460
439 PRINT
440 PRINT:PRINT"PERFECT!!"
444 PRINT
445 IF S=0 THEN R(X)=R(X)+1
450 PRINT
460 INPUT "DO YOU WANT ANOTHER ONE";A$
462 PRINT
465 IF A$="Y" OR A$="YES" THEN 480
470 PRINT"YOU GOT ";R(X);" OUT OF ";Z
475 GOTO 500
480 PRINT:PRINT:PRINT:NEXT Z
482 PRINT
485 GOTO 470
500 PRINT:PRINT"WOULD YOU LIKE ANOTHER"
505 INPUT"CATEGORY";A$
510 IF A$="Y" OR A$="YES" THEN 30
600 END