home *** CD-ROM | disk | FTP | other *** search
/ Loadstar 7 / 007.d81 / multiply (.txt) < prev    next >
Commodore BASIC  |  2022-08-26  |  3KB  |  117 lines

  1. 10 rem**multiplication drill
  2. 20 rem**john l.eubanks,ph.d
  3. 30 rem**pineville,la.71360
  4. 40 rem**load"multiply",8
  5. 50 rem**08/09/84
  6. 60 rem**
  7. 70 print"[147]"
  8. 80 rem**instructions and title
  9. 90 print"[147]":poke53281,2
  10. 91 print"[144]         multiplication drill"
  11. 92 print"                 by[144]"
  12. 93 print"            john l eubanks[154]"
  13. 94 forx=1to2000:nextx:print"[147]"
  14. 100 print"please multiply the two numbers"
  15. 110 print"and type your answer when asked."
  16. 120 print"you may work the problem "
  17. 130 print"on paper if you like."
  18. 140 print:print
  19. 150 print"press the * key to view the menu"
  20. 160 print"and to select item difficulty."
  21. 170 get a$
  22. 180 if a$<>"*"then170
  23. 190 let t=0
  24. 200 print"[147]"
  25. 205 let t=0
  26. 210 print"            ***menu***"
  27. 215 print:print
  28. 220 print"choose one level of difficulty"
  29. 230 print:print
  30. 240 print" key # 1 for 0-5"
  31. 250 print" key # 2 for 5-10"
  32. 260 print" key # 3 for 0-10"
  33. 270 print" key # 4 for 5-20"
  34. 280 print" key # 5 to exit the program"
  35. 290 print:print
  36. 300 print"press the key # of the level you choose"
  37. 305 print"then press <ret>"
  38. 310 print:print
  39. 312 poke198,0:wait198,1
  40. 320 getp$:p=val(p$):ifp<1orp>5then200
  41. 330 on p goto 1000,2000,3000,4000,5000
  42. 350 goto200
  43. 990 rem**random numbers subroutine for           0-5 and answer calculation
  44. 1000 n=int(5*rnd(0))
  45. 1020 m=int(5*rnd(0))
  46. 1025 let k=0
  47. 1040 a=n*m:gosub 9000
  48. 1050 goto1000
  49. 1060 rem
  50. 1190 rem**random numbers subroutine for          5-10 and answer calculation
  51. 1200 -12010
  52. 2000 n=int(5*rnd(0)+5)
  53. 2020 m=int(5*rnd(0)+5)
  54. 2025 let k=0
  55. 2040 a=n*m:gosub 9000
  56. 2050 goto 2000
  57. 2060 rem
  58. 2990 rem**random numbers subroutine for           0-10 and answer calculation
  59. 3000 n=int(10*rnd(0))
  60. 3020 m=int(10*rnd(0))
  61. 3025 let k=0
  62. 3030 a=n*m:gosub 9000
  63. 3050 goto3000
  64. 3060 rem
  65. 3990 rem**random numbers subroutine for           5-20 and answer calculation
  66. 4000 n=int(15*rnd(0)+5)
  67. 4010 m=int(15*rnd(0)+5)
  68. 4015 let k=0
  69. 4040 a=n*m:gosub 9000
  70. 4050 goto4000
  71. 4060 rem
  72. 5000 print"[147]"
  73. 5010 goto63000
  74. 8990 rem**print routine and answer input
  75. 9000 print"[147]"
  76. 9010 printn;"x";m;"= ?"
  77. 9020 print
  78. 9030 input"what is your answer";y
  79. 9040 if abs(y-a)<.001 then 9075
  80. 9045 let tt=0
  81. 9050 print"[147]":print"sorry, thats not quite right.";
  82. 9055 let  k=k+1
  83. 9056 if k<3 then print" try again":goto9060
  84. 9058 if k=>3 then fordl=1to2000:nextdl:goto  12000
  85. 9060 for u=1to1000:nextu
  86. 9070 goto9000
  87. 9075 gosub 9100
  88. 9080 print"[147]":print""
  89. 9082 rem**counting and limit routine
  90. 9085 let t=t+1
  91. 9087 if t<5 then 10000
  92. 9090 if t=5 then 9092
  93. 9092 print"[147]":print"five correct is reallly neat!  choose     again!"
  94. 9095 fori=1to2000:nexti:goto200
  95. 9100 let p=int(10*rnd(0)+1)
  96. 9105 onp goto 9205,9206,9207,9208,9209,9210,9211,9212,9213,9214,9215
  97. 9110 return
  98. 9205 print"[156]   superfine!":forx=1to1200:nextx:goto9110
  99. 9206 print"[158]   are you a math pro ?":forx=1to1200:nextx:goto9110
  100. 9207 print"******right again*****":forx=1to1200:nextx:goto9110
  101. 9208 print"[144]  man, what a job !!":forx=1to1200:nextx:goto9110
  102. 9209 print"  soooooper! [146]":forx=1to1200:nextx:goto9110
  103. 9210 print"very[158] very[159] good ":forx=1to1200:nextx:goto9110
  104. 9211 print"[158]    sure you're not a math pro ? ":forx=1to1200:nextx:goto9110
  105. 9212 print"   nicely, nicely":forx=1to1200:nextx:goto9110
  106. 9213 print"   [158]whee  ":forx=1to1200:nextx:goto9110
  107. 9214 print" einstein,yet       [146]":forx=1to1200:nextx:goto9110
  108. 9215 print"[144] awesome  ":forx=1to1200:nextx:goto9110
  109. 10000 return
  110. 12000 print"[147]the correct answer "
  111. 12005 print"for ";n;"x";m;"is";a
  112. 12010 for z=1to3000:nextz:print"[147]"
  113. 12020 goto10000
  114. 63000 rem   connect back to l.s.
  115. 63002 print"[147]load"chr$(34)"payload"chr$(34)",8":print"run"
  116. 63004 poke198,0:poke631,13:poke632,13:poke198,2:end
  117.