home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Simtel MSDOS 1992 June
/
SIMTEL_0692.cdr
/
msdos
/
educatin
/
drill.arc
/
DIV.BAS
< prev
next >
Wrap
BASIC Source File
|
1986-08-11
|
2KB
|
36 lines
100 REM * DIV.BAS * DIVISION PROGRAM USED WITH DRILL.BAS *
110 CLS:'Use your own clear screen command here.
120 REM * Seed the random number generator from Time$
130 A=VAL(MID$(TIME$,4,2)+MID$(TIME$,7,2)):RANDOMIZE A
140 PRINT TAB(10)" ----- Division Problems -----"
150 PRINT
160 PRINT"You will be given 20 division problems with a limited"
170 PRINT"time to answer each problem. If you miss no more than"
180 PRINT"one problem, the problems will get harder. If you miss"
190 PRINT"more than five, they get easier.
200 PRINT"You cannot correct errors, so be careful."
210 PRINT:INPUT"What is the largest divisor to be used";LA
220 IF LA<3 THEN LA=3
230 CLS:PRINT"Largest divisor is";LA
240 FOR X=1 TO 20
250 A=INT(RND*(LA-1)+1)
260 B=INT(RND*(LA-1)+1)
270 PRINT A*B;" / ";A;" = ";
280 IF B<10 THEN 310
290 FOR Y=1 TO 4000:T$=INKEY$:IF T$="" THEN NEXT Y
300 IF T$="" THEN 320
310 FOR Z=1 TO 2000:U$=INKEY$:IF U$="" THEN NEXT Z ELSE 320
320 PRINT T$+U$;" ";
330 IF VAL(T$)*10+VAL(U$)=B THEN SC=SC+1 ELSE PRINT;" the correct answer is";B;:FOR Y=1 TO 4000:NEXT Y:V$=INKEY$:W$=INKEY$:Z$=INKEY$
340 PRINT
350 T$="":U$=""
360 NEXT X
370 PRINT
380 CT=CT+1:TL=TL+SC
390 PRINT"Score on last 20 problems is";SC*5;"%":PRINT"Score on all problems is";INT((TL*5/CT)+.5);"%"
400 IF SC>18 THEN LA=LA+1
410 IF SC<15 THEN LA=LA-1
420 SC=0:PRINT"Do you want to do another set (Y/N)?"
430 CU$=INKEY$:IF CU$="" THEN 430
440 IF CU$="Y" OR CU$="y" THEN 230 ELSE IF CU$="N" OR CU$="n" THEN RUN"DRILL.BAS" ELSE 430