home *** CD-ROM | disk | FTP | other *** search
/ UpTime Volume 2 #6 / utv2n6s1.d64 / adding decimals (.txt) < prev    next >
Encoding:
Commodore BASIC  |  1988-01-01  |  12.7 KB  |  395 lines

  1. 1 if a=0 then a=1:load"chr v2",8,1
  2. 2 if a=1 then a=2:load"vision",8,1
  3. 3 poke 56,104:clr
  4. 5 rem *** adding decimals ***
  5. 9 poke 53265,peek(53265) and 239
  6. 10 poke 53280,0:poke 53281,0
  7. 11 poke 53272,(peek(53272)and 15)or 176
  8. 12 poke 56576,(peek(56576)and252)or 2
  9. 13 poke 53272,(peek(53272)and 240)or 12
  10. 14 poke 648,108:print"[147]";:poke 53265,peek(53265) or 16
  11. 15 poke 28664,160:poke 28665,161
  12. 16 for z=54272 to 54296:poke z,.:next
  13. 17 gosub 3500:poke 198,0
  14. 18 get a$:if a$<>" " then 18
  15. 19 gn$="[193]dding [196]ecimals"
  16. 20 for z=54272 to 54296:poke z,.:next:ford=1to6:readre$(d):next
  17. 25 data "[199]reat!","[198]antastic!","[211]uper!","[217]ou've got it!"
  18. 26 data "[217]es! [217]es! [217]es!","[212]hat's [199]reat!"
  19. 28 forx=0to7:reada:poke30936+x,a:poke31056+x,peek(29320+x):next
  20. 30 data 0,128,192,224,240,224,192,128
  21. 32 forx=0to15:reada:poke30944+x,a:next
  22. 34 data 255,127,63,31,15,31,63,127,255,254,252,248,240,248,252,254
  23. 50 dimnm$(15):ford=0to10:readnm$(d):next
  24. 52 data "[172][192][187][157][157][157][221] [221][157][157][157][188][192][190]"
  25. 54 data " [174][157][221][157][157] [177] "
  26. 56 data "[172][192][187][157][157][157][172][192][190][157][157][157][173][192][189]"
  27. 58 data "[172][192][187][157][157][192][179][157][157][157][188][192][190]"
  28. 60 data "[174][157][173][219][157][177]"
  29. 62 data "[176][192][187][157][157][157][173][192][187][157][157][157][173][192][190]"
  30. 64 data"[172][192][187][157][157][157][171][192][187][157][157][157][188][192][190]"
  31. 66 data"[176][192][174][157][157][172][190][157][157][177]"
  32. 68 data"[172][192][187][157][157][157][171][192][179][157][157][157][188][192][190]"
  33. 70 data"[172][192][187][157][157][157][188][192][179][157][157][157][188][192][190]"
  34. 74 data"[223][169][146][157][157]\][157][157][169][223]"
  35. 80 fora=6to2step-1:readpl$(a):nexta
  36. 85 data "thousandths","hundredths","tenths","","ones"
  37. 95 goto 2000
  38. 100 rem *** zippy titles ***
  39. 105 rem ln=line# to place text
  40. 110 poke646,11:letlc=(23-ln)/3
  41. 115 tb=(40-len(tx$))/2
  42. 120 ford=23tolnstep-1:print"";
  43. 125 ford1=1tod:print"";:nextd1
  44. 130 ifd/6=int(d/6)then gosub165
  45. 135 printtab(tb)tx$
  46. 140 nextd
  47. 145 ford=23toln+1step-1:print"";
  48. 150 ford1=1tod:print"";:next
  49. 155 printtab(11)"                          "
  50. 160 next:return
  51. 165 ifpeek(646)=15thenpoke646,1
  52. 170 ifpeek(646)=12thenpoke646,15
  53. 175 ifpeek(646)=11thenpoke646,12
  54. 180 return
  55. 200 rem ***        clear          ***
  56. 210 for er=lnto24:poke 781,er:sys 59903:next:return
  57. 300 rem
  58. 305 rem ***     reward sound      ***
  59. 310 rem
  60. 320 poke 53280,2:poke 53281,2
  61. 325 s=54272:pokes+24,7:pokes+1,110:pokes+5,9:pokes+6,10:pokes+4,17:pokes+4,16
  62. 330 for d=1 to 25:next
  63. 332 poke 53280,5:poke 53281,5
  64. 335 s=54279:pokes+24,7:pokes+1,110:pokes+5,9:pokes+6,10:pokes+4,17:pokes+4,16
  65. 340 for d=1 to 25:next
  66. 342 poke 53280,6:poke 53281,6
  67. 345 s=54286:pokes+24,7:pokes+1,110:pokes+5,9:pokes+6,10:pokes+4,17:pokes+4,16
  68. 350 for d=1 to 25:next
  69. 352 poke 53280,0:poke 53281,0
  70. 355 sc=sc+1
  71. 365 return
  72. 405 rem *** get numeric input from ***
  73. 410 rem ***     user for use in    ***
  74. 415 rem ***     working problem    ***
  75. 420 rem
  76. 425 open1,0:input#1,j$:close1,0
  77. 430 j=val(j$)
  78. 435 return
  79. 480 rem *** print screen header ***
  80. 481 print"[147]":poke53287,2:poke53288,12:poke53248,40:poke53249,56:poke 53250,40
  81. 482 poke 53251,56
  82. 485 forx=0to1:poke53277,peek(53277)or(2^x):poke 53271,peek(53271)or(2^x)
  83. 490 poke 53269,peek(53269)or(2^x):nextx
  84. 495 return
  85. 499 forx=0to2:poke53269,peek(53269)and(255-2^x):nextx:return
  86. 500 rem ** short wrong sound **
  87. 505 n$="028":s=54272:pokes+6,96:pokes+24,15
  88. 510 forq=1to6 step3
  89. 515 pokes+1,val(mid$(n$,q,2)):pokes+4,33
  90. 520 forjw=1tot*val(mid$(n$,q+2,1)):next:forr=1to100:next
  91. 525 pokes+4,0:next:return
  92. 600 rem
  93. 605 rem *** general purpose delay ***
  94. 610 rem
  95. 615 for d=1 to 1300:next
  96. 620 return
  97. 625 return
  98. 800 rem *** title box ***
  99. 805 print"";
  100. 810 print"[159][192][157][157][156][183][183][145][145]";
  101. 815 forx=1to23:print"[154][175][157][159][192][157][156][183][145][145]";:next
  102. 820 print"[154][175][175][157][157][159][192]":return
  103. 850 print"[154]";:goto 855
  104. 851 print"[150]";
  105. 855 print"";
  106. 860 print"   [172][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][187]"
  107. 865 forjw=1to3:print"   [221][221]":next
  108. 870 print"   [188][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][190]"
  109. 880 return
  110. 900 print"";:ford=1to24:print"";:next
  111. 905 print"[159][169][208]ress [210][197][212][213][210][206] to [195]ontinue or _ to [197]xit[146][169][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][145][145][145]"
  112. 925 s=54272:pokes+24,7:pokes+1,110:pokes+5,9:pokes+6,10:pokes+4,17:pokes+4,16
  113. 927 poke 198,0
  114. 930 getrc$:ifrc$=""then930
  115. 940 ifrc$="_"thencp=cp+1:goto 4000
  116. 950 ifrc$<>chr$(13)then930
  117. 960 return
  118. 980 print"";:forjg=1toy:print"";:nextjg:printtab(x);tx$;:return
  119. 990 x=(40-len(tx$))/2:goto980
  120. 1100 rem *** wrong sound ***
  121. 1105 n$="042034":s=54272:pokes+6,96:pokes+24,15
  122. 1110 forq=1to6 step3
  123. 1115 pokes+1,val(mid$(n$,q,2)):pokes+4,33
  124. 1120 forjw=1tot*val(mid$(n$,q+2,1)):next:forr=1to300:nextr
  125. 1125 pokes+4,0:nextq:return
  126. 1200 rem *** change color of number ***
  127. 1205 co=3:goto 1215
  128. 1210 co=1
  129. 1215 b1=55296:b2=b1+x+(y*40)
  130. 1220 forr=1to3:forq=0to2:pokeb2+q,co:nextq:b2=b2+40:nextr:return
  131. 1300 rem *** place number at x,y ***
  132. 1305 nu$=str$(nu):foraa=1tolen(nu$)
  133. 1310 tp$=mid$(nu$,aa,1):iftp$=" "then1325
  134. 1315 iftp$="."thentx$="*":y=y+2:gosub980:y=y-2:x=x+1:goto1325
  135. 1320 tx$=nm$(val(tp$)):gosub980:x=x+3
  136. 1325 nextaa:return
  137. 1400 rem *** place number slowly ***
  138. 1404 nu$=str$(nu)
  139. 1405 xx=x:print"[159]";:foraa=len(nu$)to1step-1
  140. 1410 tp$=mid$(nu$,aa,1):iftp$=" "then1425
  141. 1415 iftp$="."thentx$="*":x=x+2:y=y+2:gosub980:y=y-2:x=x-3:goto1422
  142. 1420 tx$=nm$(val(tp$)):gosub980:x=x-3
  143. 1422 fordd=1to300:nextdd
  144. 1425 nextaa:fordd=1to300:nextdd
  145. 1430 forx=xxto(xx-(3*len(nu$)))step-3:gosub1210:next:print"";:return
  146. 1500 rem *** option 2 input routine ***
  147. 1504 nu$=str$(nu)
  148. 1505 ot$="":fortp=len(nu$)to2step-1:wa=0
  149. 1507 poke 198,0
  150. 1510 geta$:ifa$=""thentx$="[159][176][192][174][157][157][157][221] [221][157][157][157][173][192][189]":gosub980
  151. 1511 ifa$=""thentx$="   [157][157][157]   [157][157][157]   ":gosub980:goto 1510
  152. 1512 a=val(a$):ifmid$(nu$,tp,1)="."anda$<>"."andop=3then1510
  153. 1513 ifa$="."then1517
  154. 1515 ifa<0ora>9then1510
  155. 1516 ifop=3then1526
  156. 1517 ifa$=mid$(nu$,tp,1)then1525
  157. 1518 gosub500:wa=wa+1:ifwa=3then1525
  158. 1520 goto 1510
  159. 1525 ifa$="."thentx$="*":y=y+2:x=x+2:gosub980:x=x-3:y=y-2:goto1527
  160. 1526 ifa$<>"."andop=2thentx$=nm$(val(mid$(nu$,tp,1))):gosub980:x=x-3
  161. 1527 ifa$<>"."andop=3thentx$=nm$(val(a$)):gosub980:x=x-3
  162. 1528 ax=x:ay=y:iftp=len(nu$)andcn$<>""thentx$=cn$:x=30:y=5:gosub980:cn$=""
  163. 1529 x=ax:y=ay
  164. 1530 ot$=a$+ot$:next:return
  165. 2000 rem
  166. 2005 rem ***   main program   ***
  167. 2010 rem
  168. 2015 print"[147]";:gosub480:ln=1:tx$="[193]dding [196]ecimals":gosub 100:gosub800
  169. 2020 x=0:y=10
  170. 2025 tx$="[196]o you want instructions? [145][164][164][164][164][164][157][157][157][157][157][165][217]/[206][167][157][157][157][157][157][163][163][163][163][163][145] "
  171. 2027 tx$=tx$+"       [157][157][157][157][157][157][157]":gosub 980
  172. 2030 mx=1:gosub3000:i$=t$:ifi$="y"thengosub30000
  173. 2035 ifi$<>"n"andi$<>"y"thenprint"[145]";:goto2025
  174. 2038 ln=5:gosub200
  175. 2040 y=10:x=0:tx$="[215]hat is your name? "
  176. 2045 gosub 980:mx=16:gosub 3000:nn$=t$:gosub200
  177. 2050 x=0:y=10:tx$="[215]hich option do you want:"
  178. 2053 gosub 980
  179. 2055 tx$="   1.  [196]emonstration.":y=12:gosub980
  180. 2060 tx$="   2.  [215]ork [197]xamples with [200]elp.":y=13:gosub980
  181. 2065 tx$="   3.  [211]tep-by-[211]tep [208]roblems.":y=14:gosub980
  182. 2068 tx$="   4.  [193]nswers [207]nly.":y=15:gosub980
  183. 2069 tx$="[217]our choice? [145][164][164][164][164][164][157][157][157][157][157][165]1-4[167][157][157][157][157][157][163][163][163][163][163][145] ":y=17
  184. 2070 gosub980:mx=1:gosub3000
  185. 2071 op=val(t$):ifop>1thennp$="[145][164][164][164][164][164][164][157][157][157][157][157][157][165]5-20[167][157][157][157][157][157][157][163][163][163][163][163][163][145] ":mx=2
  186. 2072 ifop=1thennp$="[145][164][164][164][164][164][157][157][157][157][157][165]1-5[167][157][157][157][157][157][163][163][163][163][163][145] ":mx=1
  187. 2073 ifop<>1andop<>2andop<>3andop<>4then2070
  188. 2074 tx$="[200]ow many problems? "+np$:y=19:gosub980:gosub3000:np=val(t$)
  189. 2075 ifop=1then2078
  190. 2076 ifnp<5ornp>20then2074
  191. 2077 goto 2079
  192. 2078 ifnp<1ornp>5then2074:gosub900
  193. 2079 forcp=1tonp:ln=5:gosub200
  194. 2080 l2=int(rnd(1)*3)+3:w1=int(rnd(1)*3)+1:w2=int(rnd(1)*5)+1
  195. 2082 d1=val(left$(str$(rnd(.999)),6))+w1:d1$=str$(d1):ifd1>6then2082
  196. 2084 d2=val(left$(str$(rnd(.999)),l2))+w2:d2$=str$(d2):ifd2>6then2084
  197. 2086 ifd1<=0ord2<=0then2080
  198. 2087 ifd1=int(d1)ord2=int(d2)then2080
  199. 2088 an=d1+d2:an$=str$(an):iflen(an$)>6then2080
  200. 2090 tx$="[193]dd"+d1$+" and"+d2$+".":y=7:x=0:ifop=4thengosub990:goto 2098
  201. 2091 gosub980:gosub600
  202. 2098 onopgosub2100,2200,2400,2300:gosub900:nextcp:goto4000
  203. 2100 rem *** demonstration ***
  204. 2105 tx$="[204]ine up the":x=0:y=9:gosub980:tx$="decimal points.":y=10:gosub980
  205. 2110 nu=d1:x=25:y=6:gosub1300:gosub600
  206. 2115 nu=d2:x=25:y=9:gosub1300:gosub600
  207. 2120 tx$="[192][192][192][192][192][192][192][192][192][192][192][192][192][192][192]":x=24:y=12:gosub980:cn=0
  208. 2125 forp=6to2step-1
  209. 2127 cc=val(mid$(d1$,p,1))+val(mid$(d2$,p,1))+cn
  210. 2130 xx=x:yy=y:tx$="                   ":y=12:x=0:gosub980:y=13:gosub980
  211. 2135 ifp=3thennextp
  212. 2140 tx$="[193]dd the":y=12:gosub980:tx$=pl$(p)+" column.":y=13:gosub980:x=xx:y=yy
  213. 2150 y=13:x=17+(3*p):ifp=2thenx=25
  214. 2151 yy=y:y=6:gosub1200:y=9:gosub1200:y=13:gosub1200:y=yy:gosub600
  215. 2155 ifp=2thenx=25:nu=cc:print"[159]":gosub1300:print"":goto2178
  216. 2160 y=13:x=17+(3*p):nu=cc:ifcc<10thenprint"[159]":gosub1300:print"":cn=0:goto2178
  217. 2165 nu=val(right$(str$(cc),1)):print"[159]":gosub1300:tx$=left$(str$(cc),2):xx=x:yy=y
  218. 2170 print"":cn=val(tx$):x=14+(3*p):ifp=4thenx=x-1
  219. 2175 y=5:gosub980:x=xx:y=yy
  220. 2178 xx=x:yy=y:x=17+(3*p):ifp=2thenx=25
  221. 2179 y=6:gosub1210:y=9:gosub1210:y=13:gosub1210:y=yy:x=xx
  222. 2180 next p
  223. 2185 tx$="[208]lace the":x=0:y=15:gosub980:tx$="decimal point.":y=16:gosub980
  224. 2190 tx$="[150]*":x=28:y=15:gosub980:gosub600:tx$="*":gosub980
  225. 2195 return
  226. 2200 rem *** with help ***
  227. 2205 tx$="[204]ine up the":x=0:y=9:gosub980:tx$="decimal points.":y=10:gosub980
  228. 2210 nu=d1:x=25:y=6:gosub1300:gosub600
  229. 2215 nu=d2:x=25:y=9:gosub1300:gosub600
  230. 2220 tx$="[192][192][192][192][192][192][192][192][192][192][192][192][192][192][192]":x=24:y=12:gosub980:cn=0
  231. 2225 forp=6to2step-1
  232. 2227 cc=val(mid$(d1$,p,1))+val(mid$(d2$,p,1))+cn
  233. 2230 xx=x:yy=y:tx$="                   ":y=12:x=0:gosub980:y=13:gosub980
  234. 2235 ifp=3thennextp
  235. 2240 tx$="[193]dd the":y=12:gosub980:tx$=pl$(p)+" column.":y=13:gosub980:x=xx:y=yy
  236. 2250 y=13:x=17+(3*p):ifp=2thenx=25
  237. 2251 yy=y:y=6:gosub1200:y=9:gosub1200:y=13:gosub1200:y=yy
  238. 2255 ifp=2thenx=25:nu=cc:print"[159]":gosub1500:print"":goto2278
  239. 2260 y=13:x=17+(3*p):nu=cc:ifcc<10thenprint"[159]":gosub1500:print"":cn=0:goto2278
  240. 2265 nu=val(right$(str$(cc),1)):print"[159]":gosub1500:tx$=left$(str$(cc),2):xx=x:yy=y
  241. 2270 print"":cn=val(tx$):x=14+(3*p):ifp=4thenx=x-1
  242. 2275 y=5:gosub980:x=xx:y=yy
  243. 2278 xx=x:yy=y:x=17+(3*p):ifp=2thenx=25
  244. 2279 y=6:gosub1210:y=9:gosub1210:y=13:gosub1210:y=yy:x=xx
  245. 2280 next p
  246. 2285 tx$="[208]lace the":x=0:y=15:gosub980:tx$="decimal point.":y=16:gosub980
  247. 2290 tx$="[150]*":x=28:y=15:gosub980:gosub600:tx$="*":gosub980
  248. 2295 return
  249. 2300 rem *** answer only ***
  250. 2305 tx$="[197]nter your answer: ":y=10:x=8:gosub980:mx=6:gosub3000:j=val(t$)
  251. 2310 ifabs(j-an)>=.0009 then2315
  252. 2311 tx$=re$(int(rnd(1)*6)+1):y=14:ifop=3theny=18
  253. 2312 gosub990:gosub300:return
  254. 2315 gosub1100:tx$="[212]he correct answer is"+an$:y=14:ifop=3theny=18
  255. 2317 gosub 990
  256. 2320 tx$="[211]hall [201] show you this one? [145][164][164][164][164][164][157][157][157][157][157][165][217]/[206][167][157][157][157][157][157][163][163][163][163][163][145] ":y=16:x=3
  257. 2323 ifop=3theny=20
  258. 2325 gosub980:mx=1:gosub3000:ift$<>"y"and t$<>"[217]" thenreturn
  259. 2330 ln=5:gosub 200
  260. 2335 tx$="[193]dd"+d1$+" and"+d2$+".":y=7:x=0:gosub980:goto 2100
  261. 2400 rem *** step by step ***
  262. 2405 tx$="[204]ine up the":x=0:y=9:gosub980:tx$="decimal points.":y=10:gosub980
  263. 2410 nu=d1:x=25:y=6:gosub1300:gosub600
  264. 2415 nu=d2:x=25:y=9:gosub1300:gosub600
  265. 2420 tx$="[192][192][192][192][192][192][192][192][192][192][192][192][192][192][192]":x=24:y=12:gosub980:cn=0
  266. 2425 jj$=" ":forp=6to2step-1:jj$=ot$+jj$
  267. 2427 cc=val(mid$(d1$,p,1))+val(mid$(d2$,p,1))+cn
  268. 2430 xx=x:yy=y:tx$="                   ":y=12:x=0:gosub980:y=13:gosub980
  269. 2435 ifp<>3then2440
  270. 2437 tx$="[208]lace the":x=0:y=12:gosub980:tx$="decimal point.":y=13:gosub980
  271. 2438 x=26:nu$=".":gosub1505:nextp
  272. 2440 tx$="[193]dd the":y=12:gosub980:tx$=pl$(p)+" column.":y=13:gosub980:x=xx:y=yy
  273. 2450 y=13:x=17+(3*p):ifp=2thenx=25
  274. 2451 yy=y:y=6:gosub1200:y=9:gosub1200:y=13:gosub1200:y=yy
  275. 2455 ifp=2thenx=25:nu=cc:print"[159]":gosub1500:print"":goto2478
  276. 2460 y=13:x=17+(3*p):nu=cc:ifcc<10thenprint"[159]":gosub1500:print"":cn=0:goto2478
  277. 2465 nu=val(right$(str$(cc),1)):print"[159]":gosub1500:tx$=left$(str$(cc),2):xx=x:yy=y
  278. 2470 print"":cn=val(tx$):x=14+(3*p):ifp=4thenx=x-1
  279. 2475 y=5:gosub980:x=xx:y=yy
  280. 2478 xx=x:yy=y:x=17+(3*p):ifp=2thenx=25
  281. 2479 y=6:gosub1210:y=9:gosub1210:y=13:gosub1210:y=yy:x=xx
  282. 2480 next p:jj$=ot$+jj$
  283. 2485 ifabs(val(jj$)-an)<.0009thengoto2311
  284. 2490 goto 2315
  285. 2495 return
  286. 3000 t$="":print"[164]";:poke 198,0
  287. 3010 get a$:if a$="" then 3010
  288. 3020 if a$=chr$(13) then printchr$(20):return
  289. 3030 if a$=chr$(20) and t$="" then 3010
  290. 3040 if a$=chr$(20) then printa$a$"[164]";:t$=left$(t$,len(t$)-1):goto 3010
  291. 3045 if a$="[140]" then 5000
  292. 3050 if a$<" " or a$>"[218]" then 3010
  293. 3060 if a$>"z" and a$<"[193]" then 3010
  294. 3070 if a$=chr$(34) then 3010
  295. 3080 if len(t$)=mx then 3010
  296. 3090 printchr$(20)a$"[164]";
  297. 3100 t$=t$+a$:goto 3010
  298. 3500 print"[142]";:gosub 480:ln=1:tx$="vision software":gosub 100
  299. 3510 ln=2:tx$="and uptime presents":gosub 100
  300. 3520 gosub 3800
  301. 3530 printtab(6)"[158] [190][188][146]  [161][172][188][146]  [161][172][188][146]  [188] [146][190] [161][188][146]  [146] [172][172][187][146][187]"
  302. 3540 printtab(6)"[161][188][190][146][161] [161][146][161][161][146][161] [161][146][161][161][146][161]   [146]  [161] [188] [146] [161][146][161][162][187] "
  303. 3550 printtab(6)"[161][146][161][161][146][161] [161][146][161][190][146][190] [161][146][161][190][146][190]   [146]  [161][146][161][187] [146] [161][146][161][161][146][161] "
  304. 3560 printtab(6)"[188][190][188][190] [188][162][146][190]  [188][162][146][190]  [188][162][146][190] [188][190] [162][146]  [162][162][146] "
  305. 3570 print
  306. 3580 print" [161][172][188][146]  [161][172][162][146][190] [172][172][187][146][187] [188] [146][190] [161][188][146][172] [146]  [190][188][146]  [161][146][161]   [172][172][187][146][187]"
  307. 3590 print" [161][146][161][161][146][161] [161][188][146][187]  [161][146][161]     [146]  [161][172][172] [146] [161][188][190][146][161] [161][146][161]   [188][188][146][162]"
  308. 3600 print" [161][146][161][190][146][190] [161][146][161]   [161][146][161][172][187]   [146]  [161][146][161]  [146] [161][146][161][161][146][161] [161][146][161]   [172][187][161][146][161]"
  309. 3610 print" [188][162][146][190]  [188][162][162][146][190]  [162][162][146]  [188][162][146][190] [188][190] [162][146] [188][190][188][190] [188][162][162][146][190]  [162][162]"
  310. 3700 poke 198,0
  311. 3710 printtab(7)"[159]press spacebar to continue"
  312. 3720 print"[151]    published by softdisk publishing"
  313. 3750 return
  314. 3800 rem *** title box ***
  315. 3810 print"";
  316. 3820 print"[159][192][157][157][156][183][183][145][145]";
  317. 3830 forx=1to23:print"[154][175][157][159][192][157][156][183][145][145]";:next
  318. 3840 print"[154][175][175][157][157][159][192]":return
  319. 4000 rem
  320. 4005 rem *** print score and give ***
  321. 4010 rem ***  option of playing   ***
  322. 4015 rem ***        again         ***
  323. 4020 rem
  324. 4025 cp=cp-1:ln=5:gosub200
  325. 4030 ifop<3then4062
  326. 4035 tx$="[217]ou got"+str$(sc)+" right out of"+str$(cp)+" problems."
  327. 4037 y=10:x=0:gosub980
  328. 4038 sc=int((sc/cp)*100):ifsc>100thensc=100
  329. 4040 tx$="[212]hat makes"+str$(sc)+" percent.":y=12:x=0:gosub980
  330. 4062 tx$="[196]o you want to play again? [165][217]/[206][167][145][157][157][157][157][157][164][164][164][164][164][157][157][157][157][157][163][163][163][163][163][145]":sc=0
  331. 4065 x=0:y=15:gosub980:mx=1:gosub3000
  332. 4067 ift$="y"thenln=5:gosub200:goto2050
  333. 4070 tx$="[196]oes anyone else want to play? [165][217]/[206][167][145][157][157][157][157][157][164][164][164][164][164][157][157][157][157][157][163][163][163][163][163][145]"
  334. 4075 x=0:y=18:gosub980:mx=1:gosub3000:ift$="y"then2038
  335. 4080 tx$="[199]oodbye!":y=19:gosub990
  336. 4085 gosub499:clr:sys 8*4096+4:end
  337. 5000 gosub 480:ln=1:tx$="[210]eturn to [213]p[212]ime":gosub 100
  338. 5010 gosub 800
  339. 5020 goto 4062
  340. 30000 rem
  341. 30005 rem *** instructions ***
  342. 30010 rem
  343. 30015 gosub480:ln=1:tx$="[201] n s t r u c t i o n s":gosub 100:gosub800
  344. 30020 print"    [204]earn to add decimal numbers"
  345. 30025 print"with ease!  [212]here are four ways to use"
  346. 30030 print"this program:"
  347. 30038 print"                [207]ptions[157][157][157][157][157][157][157][163][163][163][163][163][163][163]"
  348. 30040 print"          1.  [196]emonstration."
  349. 30042 print"          2.  [215]ork examples with help."
  350. 30043 print"          3.  [211]tep-by-step problems."
  351. 30044 print"          4.  [193]nswers only."
  352. 30045 gosub 33000
  353. 30055 print"      [207]ption 1:  [196]emonstration."
  354. 30056 print"      [163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163]"
  355. 30060 print"    [201] will show you how to add two"
  356. 30062 print"decimal numbers.  [201] will set up the"
  357. 30065 print"problem and work it for you,"
  358. 30070 print"explaining each step as [201] go."
  359. 30080 gosub 33000
  360. 30090 print"  [207]ption 2: [215]ork examples with help."
  361. 30091 print"  [163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163]"
  362. 30095 print"    [217]ou must add two decimal numbers"
  363. 30100 print"that [201] will give you.  [215]e will work"
  364. 30105 print"the problem together, and [201] will"
  365. 30110 print"guide you through each step."
  366. 30115 gosub 33000
  367. 30125 print"       [207]ption 3: [211]tep-by-step."
  368. 30126 print"       [163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163]"
  369. 30130 print"    [207]n option 3, [201] will allow you "
  370. 30135 print"to work the whole problem by yourself"
  371. 30140 print"for practice.  [201]f your final answer"
  372. 30142 print"is wrong, [201] will work the problem with"
  373. 30145 print"you.  [201] will keep your score on this"
  374. 30150 print"option.":gosub33000
  375. 30151 print"      [207]ption 4: [193]nswers only."
  376. 30152 print"      [163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163]"
  377. 30153 print"   [215]ith answers only, you must"
  378. 30154 print"find the answer all by yourself,"
  379. 30155 print"without my help.  [217]ou may need "
  380. 30156 print"paper and a pencil on this option."
  381. 30157 print"   [201] will be keeping your score.":gosub 33000
  382. 30160 print"          [206]umber of [208]roblems"
  383. 30162 print"          [163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163]"
  384. 30165 print"    [217]ou will decide how many problems"
  385. 30170 print"to do.  [201]f you choose option 1, you"
  386. 30175 print"may only have 5 problems; otherwise,"
  387. 30180 print"you may have from 5 to 20 problems."
  388. 30185 gosub 33000
  389. 30187 gosub480:ln=1:tx$="[193]dding [196]ecimals":gosub100:gosub800
  390. 30190 return
  391. 33000 rem *** continue instructions ***
  392. 33005 tx$="[159][169][208]lease [208]ress [211]pacebar[146][169]":y=24:gosub990:poke 198,0
  393. 33010 getwe$:ifwe$<>" "then33010
  394. 33015 ln=5:gosub200:print"":return
  395.