home *** CD-ROM | disk | FTP | other *** search
/ Simtel MSDOS 1992 June / SIMTEL_0692.cdr / msdos / educatin / drill.arc / DIV.BAS < prev    next >
BASIC Source File  |  1986-08-11  |  2KB  |  36 lines

  1. 100 REM * DIV.BAS * DIVISION PROGRAM USED WITH DRILL.BAS *
  2. 110 CLS:'Use your own clear screen command here.
  3. 120 REM * Seed the random number generator from Time$
  4. 130 A=VAL(MID$(TIME$,4,2)+MID$(TIME$,7,2)):RANDOMIZE A
  5. 140 PRINT TAB(10)" ----- Division Problems -----"
  6. 150 PRINT
  7. 160 PRINT"You will be given 20 division problems with a limited"
  8. 170 PRINT"time to answer each problem. If you miss no more than"
  9. 180 PRINT"one problem, the problems will get harder. If you miss"
  10. 190 PRINT"more than five, they get easier.
  11. 200 PRINT"You cannot correct errors, so be careful."
  12. 210 PRINT:INPUT"What is the largest divisor to be used";LA
  13. 220 IF LA<3 THEN LA=3
  14. 230 CLS:PRINT"Largest divisor is";LA
  15. 240 FOR X=1 TO 20
  16. 250   A=INT(RND*(LA-1)+1)
  17. 260   B=INT(RND*(LA-1)+1)
  18. 270   PRINT A*B;" / ";A;" = ";
  19. 280   IF B<10 THEN 310
  20. 290   FOR Y=1 TO 4000:T$=INKEY$:IF T$="" THEN NEXT Y
  21. 300   IF T$="" THEN 320
  22. 310   FOR Z=1 TO 2000:U$=INKEY$:IF U$="" THEN NEXT Z ELSE 320
  23. 320   PRINT T$+U$;" ";
  24. 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$
  25. 340   PRINT
  26. 350   T$="":U$=""
  27. 360 NEXT X
  28. 370 PRINT
  29. 380 CT=CT+1:TL=TL+SC
  30. 390 PRINT"Score on last 20 problems is";SC*5;"%":PRINT"Score on all problems is";INT((TL*5/CT)+.5);"%"
  31. 400 IF SC>18 THEN LA=LA+1
  32. 410 IF SC<15 THEN LA=LA-1
  33. 420 SC=0:PRINT"Do you want to do another set (Y/N)?"
  34. 430 CU$=INKEY$:IF CU$="" THEN 430
  35. 440 IF CU$="Y" OR CU$="y" THEN 230 ELSE IF CU$="N" OR CU$="n" THEN RUN"DRILL.BAS" ELSE 430
  36.