home *** CD-ROM | disk | FTP | other *** search
/ Loadstar 53 / 053.d81 / roman numeral (.txt) < prev    next >
Encoding:
Commodore BASIC  |  1988-01-01  |  18.6 KB  |  455 lines

  1. 150 p1=53280:p2=53281:print"[147]":pokep1,1:pokep2,1:poke53269,255:poke53269,0
  2. 170 printchr$(142)"           one moment please..."
  3. 180 a=646:d=1:dimt$(100),wq(45):goto5530
  4. 190 pokev+41,1:pokev+29,4:poke53269,peek(53269)or4:poke53269,0
  5. 200 pokev+39,1:pokev+29,1:poke53269,peek(53269)or1:poke53269,0:fort=41to46:pokev+t,2:nextt
  6. 220 v1=10:w1=17:u1=33:l1=134:a1=10:c1=1200
  7. 225 jj=1
  8. 226 goto 270
  9. 260 poke49,peek(47):poke50,peek(48)
  10. 270 w=0:print"[147]":pokep1,0:pokep2,0:printtab(9)"[158] roman numeral teacher "
  11. 280 printtab(13)"[153](c) mcmlxxxviii":ifd=1thengosub4050:d=0
  12. 290 ifj<>1thenv1=12:w1=17:u1=50:l1=58:a1=10:c1=1350:gosub5240
  13. 300 j=0:v=0:v1=8:print"":printtab(5)"[154]select one letter: (l/r/q/e)[158]"
  14. 320 printtab(5)"l[146] learning roman numerals":printtab(5)"r[146] roman numeral examples":kk=0
  15. 340 printtab(5)"q[146] roman numerals quiz":printtab(5)"e[146] end[154]":print:print:iffs>0thengosub470
  16. 370 v1=10:w1=17:u1=67:l1=12:a1=10:c1=900:gosub5240
  17. 380 w1=17:c1=1000:u1=100:l1=117:a1=15
  18. 390 getd$:ifd$="r"then850
  19. 410 ifd$="l"thenprint""tab(5)"                 ":goto1090
  20. 420 ifd$="q"theng=0:goto3150
  21. 430 ifd$="e"thengosub7000
  22. 450 goto390
  23. 460 :
  24. 470 fort=1to250:nextt:m$="quiz tally:":n$="[157] right out of":p$="[157] tries":printtab(2)"";
  25. 490 formm=1to13:printmid$(m$,mm,1);:next:printft;:fornn=1to14
  26. 500 printmid$(n$,nn,1);:next:printfs;:forps=1to7:printmid$(p$,ps,1);:next:print:mm=0:nn=0:pp=0:return
  27. 540 poke53248+29,2:poke53269,peek(53269)or2:printtab(5)"[158]    right! ";
  28. 560 ifb=1orb=3thenprinta$" ="x:goto580
  29. 570 print"[157]"x"= "a$;
  30. 580 print"[145][145][145][145][145][145]":poke781,19:sys59903:ct=0:ft=ft+1:fs=fs+1:cj=1:cp=1:gosub5320
  31. 600 z=z+1:zz=zz+1:fort=1to1000:nextt:g=0:poke53269,peek(53269)and(253)
  32. 610 cc=1:pp=1:rr=0:gosub4650:poke781,22:sys59903:poke214,17:print:poke211,0
  33. 630 print"[153]"z"[157] right out of"zz"  ";:printint((z/zz)*100)"[157]%  ":return
  34. 670 print"[147]":print" important point!":c1=1000:w1=17:a1=15:gosub5240
  35. 690 print" one more thing before going back to     the main menu..."
  36. 700 print" if you put a bar over a roman-numeral"
  37. 710 print" letter, the value of that letter":print" is multiplied by 1000."
  38. 720 printtab(7)"[210]"tab(23)"[210]":print" like: x=10,000...or...m=1,000,000":print" usually only"
  39. 750 print" the letters 'v', 'x' and 'm' are used":print" so..."
  40. 760 printtab(15)"[198]":printtab(15)"vmdclxvii":print" equals: 5000+1000+500+100+50+10+5+1+1"
  41. 780 printtab(17)"6667":print" none of these examples appear in quiz!"
  42. 800 printtab(7)"[156] for main menu, press 'm'";:ifk=1thenk=0
  43. 810 getm$:ifm$="m"thenj=1:return
  44. 820 goto810
  45. 850 pokep1,1:pokep2,1:gosub5240:a$="":aa=1:bb=3999
  46. 860 gosub3740:print" example":print" roman numeralstandard number"
  47. 890 print" "a$tab(22)x:ifv=1thenprinttab(9)"([158]subtraction needed)":v=0
  48. 900 poke214,20:print:poke211,1:print"want another example? press 'a'"
  49. 910 print" return to main menu?? press 'm'":jj=1:gosub990
  50. 930 getf$:iff$=""then930
  51. 940 iff$="a"thena$="":goto860
  52. 950 iff$="m"thenj=1:goto270
  53. 960 goto930
  54. 990 forr=54272to54295:poker,0:next:vl=54296:wf=54276:ad=54277:nh=54273:nl=54272
  55. 1010 pokevl,15:pokewf,33:pokead,10:pokenh,200:pokenl,243:ifjj=1thenforn=1to500:next:goto1030
  56. 1020 forn=1to1500:next
  57. 1030 pokenh,0:pokenl,0:pokead,0:ifjj=1thenjj=0:return
  58. 1050 getg$:ifg$=chr$(13)thenreturn
  59. 1060 goto1050
  60. 1090 pokep1,7:pokep2,7:a1=15:print"[147]":gosub5240:print"[147]":print" roman numerals"
  61. 1110 print" roman numerals use letters instead of   regular numerals.";
  62. 1120 print" you should remember   that specific letters";
  63. 1130 print" are used for":print" specific standard (arabic) numbers."
  64. 1140 print"[156] press <return> for roman numeral chart[151]":gosub1050
  65. 1180 c1=100:gosub5240
  66. 1190 print"         roman           standard          ":ifk=1thenc1=100:gosub5240
  67. 1210 printtab(7)"[145]numeral           number":printtab(13)"i"tab(19)"="tab(25)"1"
  68. 1230 printtab(13)"v"tab(19)"="tab(25)"5":printtab(13)"x"tab(19)"="tab(25)"10":printtab(13)"l"tab(19)"="tab(25)"50"
  69. 1260 printtab(13)"c"tab(19)"="tab(25)"100":printtab(13)"d"tab(19)"="tab(25)"500"
  70. 1280 printtab(13)"m"tab(19)"="tab(25)"1000":ifv=1thenv=0:print"":goto1330
  71. 1290 print" by combining certain letters, you can   build the roman";
  72. 1300 print" numeral you need.";:print"..by   observing the letters you have, ";
  73. 1310 print"you     can easily change any roman numeral     into an everyday";
  74. 1320 print" arabic number."
  75. 1330 ifk=1ors=1thenprinttab(5)"[158]to return to previous page, 'p'"
  76. 1340 printtab(4)"to go to learning menu, press 'l'[144]";
  77. 1350 geth$:ifh$=""then1350
  78. 1360 ifh$="l"thens=0:v=0:goto1410
  79. 1370 ifh$="p"andk=1ors=1thenreturn
  80. 1380 goto1350
  81. 1410 c1=500:k1=0:gosub5240:pokep1,3:pokep2,3:print"[147]":print"[151] how to"
  82. 1440 print" select one: (1/2/3/4)"
  83. 1450 print" 1[146] change roman numerals to standard":k=0
  84. 1460 print" 2[146] change standard numbers to roman"
  85. 1470 print" 3[146] return to roman numeral chart":print" 4[146] return to main menu":d=0
  86. 1490 gett$:ift$=""then1490
  87. 1500 ift$="1"thenv=1:k$=" #1":gosub6340:goto1550
  88. 1510 ift$="2"thenk$=" #2":gosub6340:goto2250
  89. 1520 ift$="3"thenv=1:print"[147] roman numerals.":c1=200:gosub5240:goto1190
  90. 1530 ift$="4"thenj=1:goto270
  91. 1540 goto1490
  92. 1550 c1=100:gosub5240:ifk1=1thenk=1
  93. 1570 print"[147] how to "k$"[146]";:ifk=1thenprint" "
  94. 1580 ifk<>1thenprint" press <return> to continue"
  95. 1590 print" when changing from a roman numeral to   an ordinary";
  96. 1600 print" number, read your roman     numeral from right to left (_)":ifk<>1thengosub1050
  97. 1620 print" here's an example.":print" change lxxvi to an arabic numeral.":ifk<>1thengosub990
  98. 1640 print" read it backwards -- right to left (_)"
  99. 1650 print" since i=1, v=5, x=10, x=10, l=50..."
  100. 1660 print" (remember your roman numeral chart?)":ifk<>1thengosub990
  101. 1680 print" and since the numbers do not get"
  102. 1690 print" smaller: 1...5...10...10...50, just":ifk<>1thengosub990
  103. 1710 print" add 'em all up -- 1+5+10+10+50 = 76":printtab(15)"lxxvi=76":ifk<>1thengosub990
  104. 1730 print"[156] continue lesson? press <return>"
  105. 1740 print" go to roman numeral chart? press 'r'"
  106. 1750 print" how to"k$"[146]                           ":ifk<>1thenc1=100:gosub5240
  107. 1770 ifk=1thenk=0
  108. 1780 getj$:ifj$=chr$(13)then1820
  109. 1790 ifj$="r"thenv=1:k=1:print"[147] roman numerals.":gosub1190:goto1550
  110. 1800 goto1780
  111. 1810 jj=1:gosub990
  112. 1820 c1=100:gosub5240:ifk1=1thenk=1
  113. 1840 print"[147] how to"k$"[146]";:ifk=1thenprint" "
  114. 1850 ifk<>1thenprint" press <return> to continue"
  115. 1860 print" sometimes roman numerals get tricky.":ifk<>1thengosub1050
  116. 1880 print" look at this example.":print" change xciv to an arabic numeral."
  117. 1890 ifk<>1thengosub990
  118. 1900 print" as you read 'backwards' (_), notice"
  119. 1910 print" some numbers are smaller than ones"
  120. 1920 print" to their right: v=5, i=1, c=100, x=10"
  121. 1930 print" (forget your roman numeral chart?)":ifk<>1thengosub990
  122. 1950 print" if a letter of smaller value is on the"
  123. 1960 print" left";:print" of a larger one, you subtract";
  124. 1970 print" the  smaller one from the greater one.":ifk=1then2000
  125. 1990 gosub990
  126. 2000 ifk=1thenprint" *";:goto2020
  127. 2010 print" [158]*";
  128. 2020 print"subtract 'i' from 'v' ... (5-1)=4":ifk=1then2070
  129. 2040 poke214,6:print:poke211,10:print"[158][197][197]":gosub990
  130. 2060 ifk<>1thenpoke214,6:print:poke211,8:print"[158][197][197]  "
  131. 2070 ifk=1thenprint" *";:goto2090
  132. 2080 print" [158]*";
  133. 2090 print"subtract 'x' from 'c' ... (100-10)=90":ifk=1then2130
  134. 2110 gosub990:ifk<>1thenpoke214,6:print:poke211,8:print"    "
  135. 2130 print" now, add these answers up ... 90+4=94":printtab(16)"xciv=94":ifk<>1thengosub990
  136. 2160 print"[156] go to roman numeral chart? press 'r'":print" go to main menu? press 'm'"
  137. 2180 print" how to"k$"[146]                           ":ifk<>1thenc1=100:gosub5240
  138. 2200 ifk=1thenk=0
  139. 2210 geth$:ifh$="r"thenv=1:k=1:print"[147] roman numerals.":gosub1190:goto1820
  140. 2230 ifh$="m"thengosub670:goto270
  141. 2240 goto2210
  142. 2250 c1=100:gosub5240:ifk1=1thenk=1
  143. 2270 print"[147] how to"k$"[146]";:ifk=1thenprint" "
  144. 2280 ifk<>1thenprint" press <return> to continue"
  145. 2290 print" arabics to roman numerals? it's easy!":ifk=1then2320
  146. 2310 gosub1050
  147. 2320 print" here's an example.":print" change 625 to a roman numeral.":ifk=1then2350
  148. 2340 gosub990
  149. 2350 print" first, separate the number into its"
  150. 2360 print" place-value parts: 625 = 600 + 20 + 5":ifk=1then2380
  151. 2370 gosub990
  152. 2380 print" then. what roman numeral letters...":print" combine to equal '600'?";
  153. 2400 ifk<>1thenpoke214,9:print:poke211,25:print"[158] [197][197][197]         "
  154. 2410 ifk=1then2430
  155. 2420 gosub990
  156. 2430 printtab(24)" d and c  (dc";:print")":ifk=1then2450
  157. 2440 gosub990
  158. 2450 print" combine to equal  '20'?";:ifk=1then2480
  159. 2460 ifk<>1thenpoke214,9:print:poke211,25:print"[158]       [197][197]    "
  160. 2470 gosub990
  161. 2480 printtab(24)" x and x  (xx";:print")":ifk=1then2500
  162. 2490 gosub990
  163. 2500 print" combine to equal   '5'?";:ifk=1then2530
  164. 2510 ifk<>1thenpoke214,9:print:poke211,25:print"[158]            [197]"
  165. 2520 gosub990
  166. 2530 printtab(24)" just: v   (v";:print")":ifk=1then2560
  167. 2540 gosub990:ifk<>1thenpoke214,9:print:poke211,25:print" [197][197][197]         "
  168. 2560 print" (note! 600 is 'dc' -- 'cd' means 400)":ifk=1then2600
  169. 2580 gosub990:ifk<>1thenpoke214,9:print:poke211,25:print"             "
  170. 2600 print" combine the letters, going biggest      arabic numbers to";
  171. 2610 print" smallest -- dc+xx+v":printtab(15)"625=dcxxv":ifk<>1thengosub990
  172. 2630 print"[156] continue lesson? press <return>"
  173. 2640 print" go to roman numeral chart? press 'r'"
  174. 2650 print" how to."k$"[146]                           ":ifk<>1thenc1=100:gosub5240
  175. 2670 ifk=1thenk=0
  176. 2680 getj$:ifj$=chr$(13)then2710
  177. 2690 ifj$="r"thenv=1:k=1:print"[147] roman numerals.":gosub1190:goto2250
  178. 2700 goto2680
  179. 2710 c1=100:gosub5240:ifk1=1thenk=1
  180. 2730 print"[147] how to."k$"[146]";:ifk=1thenprint" "
  181. 2740 ifk<>1thenprint" press <return> to continue"
  182. 2750 print" sometimes changing to roman numerals"
  183. 2760 print" needs extra concentration...":ifk<>1thengosub1050
  184. 2780 print" this example shows why.":print" to change 479 to a roman numeral..."
  185. 2800 ifk<>1thengosub990
  186. 2810 print" separate your number into the proper"
  187. 2820 print" place-value parts: 400 + 70 + 9":ifk<>1thengosub990
  188. 2830 ifk<>1thenpoke214,10:print:poke211,20:print"[158][197][197][197]  [145]"
  189. 2840 print" what letters make up 400?";:ifk<>1thengosub990:print"";
  190. 2860 print" not c+c+c+c!":ifk<>1thengosub990
  191. 2870 print" you may use a letter no more than 3     times";
  192. 2880 print" in a row.";:ifk<>1thengosub990
  193. 2890 print" you must subtract!":print" (cd";:print") _ smaller on left";
  194. 2910 print" 400 = 500-100":ifk<>1thengosub990
  195. 2920 ifk<>1thenpoke214,10:print:poke211,20:print"      [158][197][197]   "
  196. 2930 print" (lxx) _ no subtracting! 70 = 50+10+10":ifk<>1thengosub990
  197. 2950 ifk<>1thenpoke214,10:print:poke211,20:print"           [158][197]"
  198. 2960 print" (ix";:print") _ smaller on left   9 = 10-1":ifk<>1thengosub990:print"";
  199. 2980 ifk<>1thenpoke214,10:print:poke211,20:print"[158][197][197][197]        [197]"
  200. 2990 ifk=1thenprint" smaller letter on left means subtract!":goto3030
  201. 3000 print" [158]smaller letter on left means subtract!":ifk<>1thengosub990
  202. 3020 ifk<>1thenpoke214,10:print:poke211,20:print"             "
  203. 3030 printtab(14)"479=cdlxxix":ifk<>1thengosub990
  204. 3040 print"[156] go to roman numeral chart? press 'r'":print" go to main menu? press 'm'"
  205. 3060 print" how to"k$"[146]                           ":ifk<>1thenc1=100:gosub5240
  206. 3080 ifk=1thenk=0
  207. 3090 geth$:ifh$="r"thenv=1:k=1:print"[147] roman numerals":gosub1190:goto2710
  208. 3110 ifh$="m"thengosub670:goto270
  209. 3120 goto3090
  210. 3150 pokep1,6:pokep2,6:gosub5240
  211. 3160 print"[147]":printtab(8)"[158] roman numerals quiz ":ifdd=1then3240
  212. 3170 printtab(9)"do you know them ?!":fort=1to800:nextt:print""
  213. 3190 printtab(7)"[159]press <return> to start[153]"
  214. 3200 v1=12:w1=17:u1=50:l1=58:a1=10:c1=1350:gosub5240
  215. 3210 getq$:ifq$=chr$(13)thendd=1:goto3230
  216. 3220 goto3210
  217. 3230 print"[147]":printtab(8)"[158] roman numerals quiz "
  218. 3240 printtab(7)"                        ":b=0
  219. 3250 printtab(2)"[153]you get 3 tries, then a new problem":ifdd=1thenprint
  220. 3260 printtab(7)"select level: (1/2/3/4)":e=0:ifdd=1thenprint
  221. 3270 printtab(7)"1[146] roman to arabic. easy":ifdd=1thenprint
  222. 3280 printtab(7)"2[146] arabic to roman. easy":ifdd=1thenprint
  223. 3290 printtab(7)"3[146] mixed. medium":ifdd=1thenprint
  224. 3300 printtab(7)"4[146] mixed. easy/medium/hard":ifdd=1thenprint:print
  225. 3310 printtab(7)"[158]5[146] return to main menu":ifdd=1thenprint
  226. 3320 c1=500:a1=15:u1=50:l1=58:w1=17:gosub5240:f=0
  227. 3340 getq$:ifq$="1"thenb=1:goto3430
  228. 3360 ifq$="2"thenb=2:goto3490
  229. 3370 ifq$="3"thenb=3:goto3550
  230. 3380 ifq$="4"thenb=4:goto3630
  231. 3390 ifq$="5"thenj=1:goto270
  232. 3400 goto3340
  233. 3430 print"[147][153] [159]quiz #1. easy[153]":print" roman to arabic":kk=1:c1=100:gosub5240:aa=1:bb=100
  234. 3450 gosub3700:ifs=1theng=g-1:goto4150
  235. 3470 ifk<>1thenfort=1to900:nextt
  236. 3480 z=0:zz=0:goto4130
  237. 3490 print"[147][153] [159]quiz #2. easy[153]":print" arabic to roman":kk=1:c1=100:gosub5240:aa=1:bb=100
  238. 3510 gosub3700:ifs=1theng=g-1:goto4150
  239. 3530 ifk<>1thenfort=1to900:nextt
  240. 3540 z=0:zz=0:goto4130
  241. 3550 iff=2andcv=0then3640
  242. 3560 print"[147][153] [159]quiz #3. medium[153]":print" arabic to roman / roman to arabic"
  243. 3570 iff=2andcv=0then3780
  244. 3580 kk=1:aa=100:bb=1000:e=1:c1=100:gosub5240
  245. 3590 gosub3700:ifs=1theng=g-1:goto4150
  246. 3610 ifk<>1thenfort=1to900:nextt
  247. 3620 z=0:zz=0:goto5030
  248. 3630 iff=2andcv=0then3560
  249. 3640 print"[147][153] [159]quiz #4. easy/medium/hard[153]":print" arabic to roman / roman to arabic"
  250. 3660 iff=2andcv=0then3580
  251. 3670 kk=1:e=2:c1=100:gosub5240:aa=10:bb=3999:goto3590
  252. 3700 print"[158] after entering answer, press <return>"
  253. 3710 print" enter 'q' to return to quiz menu"
  254. 3720 print" enter 'r' to see roman numeral chart":return
  255. 3740 ::hm=(bb-aa)+1:x=int(rnd(0)*hm)+aa:n=x:ifkk<>1thenprint"[147]"
  256. 3780 print""
  257. 3790 ifn-1000<0then3810
  258. 3800 p=1000:z$="m":goto4000
  259. 3810 ifn-500<0then3840
  260. 3820 ifint(n/100)=9thenz$="cm":n=n-900:p=0:v=1:goto4000
  261. 3830 p=500:z$="d":goto4000
  262. 3840 ifn-100<0then3870
  263. 3850 ifint(n/100)=4thenz$="cd":n=n-400:p=0:v=1:goto4000
  264. 3860 p=100:z$="c":goto4000
  265. 3870 ifn-50<0then3900
  266. 3880 ifint(n/10)=9thenz$="xc":n=n-90:p=0:v=1:goto4000
  267. 3890 p=50:z$="l":goto4000
  268. 3900 ifn-10<0then3930
  269. 3910 ifint(n/10)=4thenz$="xl":n=n-40:p=0:v=1:goto4000
  270. 3920 p=10:z$="x":goto4000
  271. 3930 ifn-5<0then3960
  272. 3940 ifn=9thenz$="ix":n=n-9:p=0:v=1:goto4000
  273. 3950 p=5:z$="v":goto4000
  274. 3960 ifn-1<0then3990
  275. 3970 ifn=4thenz$="iv":n=n-4:p=0:v=1:goto4000
  276. 3980 p=1:z$="i":goto4000
  277. 3990 goto4020
  278. 4000 n=n-p:a$=a$+z$:goto3790
  279. 4020 return
  280. 4050 c=40:l=23:print"[153]":printchr$(19);:forh=1toc:printchr$(18)chr$(32);:next:forv=1tol:printchr$(18)chr$(32);
  281. 4080 printchr$(146)spc(c-2)chr$(18)chr$(32);:next:forh=1toc-2:forh=1toc-2:printchr$(18)chr$(32);:next
  282. 4100 printchr$(18)chr$(32)chr$(157)chr$(148)chr$(32);:return
  283. 4130 :
  284. 4140 a$="":aa$="":gosub3740
  285. 4150 g=g+1:poke781,14:sys59903:ifg=4thengosub5090
  286. 4170 ifg=4and(b=3orb=4)theng=0:goto5030
  287. 4180 ifg=4theng=0:goto4140
  288. 4190 print"[150]"g"[157].                                   [153]"
  289. 4200 ifb=2orb=4thengosub4840:goto4260
  290. 4210 print" your roman numeral:                [157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][150]"a$
  291. 4220 ifs<>1thenc1=100:v1=10:w1=33:u1=34:l1=75:a1=15:gosub5240
  292. 4230 print"[153] change it":print" to an arabic (regular) number.":ifs=1thengosub4670
  293. 4250 xx$=""
  294. 4260 w=w+1:ln=0:print"[153] your answer is?[146] ";:gosub5990
  295. 4280 getvv$:tm=tm+1:iftm=225thengosub5990
  296. 4290 ifvv$=""then4280
  297. 4300 ifvv$=chr$(13)and(b=2orb=4)thengosub4910:goto4570
  298. 4310 ifvv$=chr$(13)then4460
  299. 4320 ifvv$=chr$(20)thengosub4800:tm=0:goto4280
  300. 4330 ifvv$="[145]"orvv$=""orvv$="[157]"orvv$=""orvv$=chr$(32)orvv$=chr$(19)then4280
  301. 4340 ifvv$="0"orvv$="1"orvv$="2"orvv$="3"then4400
  302. 4350 ifvv$="4"orvv$="5"orvv$="6"orvv$="7"then4400
  303. 4360 ifvv$="8"orvv$="9"orvv$="i"orvv$="v"then4400
  304. 4370 ifvv$="x"orvv$="l"orvv$="c"orvv$="d"orvv$="m"then4400
  305. 4380 ifvv$="q"orvv$="r"then4400
  306. 4390 goto4280
  307. 4400 printvv$;:cv=0:ifb=2orb=4thenaa$=aa$+vv$:ln=len(aa$):tm=0:goto4430
  308. 4420 xx$=xx$+vv$:ln=len(xx$):tm=0
  309. 4430 ifln=19thenprint"":printtab(10)"[150] answer too long! ":fl=1:goto4480
  310. 4440 goto4280
  311. 4450 ifb=2orb=4thengosub4910:goto4570
  312. 4460 ifxx$=""thenw=w-1:if(w-1)<0thenw=0
  313. 4470 ifxx$=""then4280
  314. 4480 t$(w)=xx$:print"":ifxx$="q"thendd=1:g=0:w=0:cv=0:cj=0:ct=0:goto3160
  315. 4500 ifxx$="r"thenv=1:cv=1:s=1:print"[147][153] roman numerals."
  316. 4510 ifxx$="r"thent$(w)=t$(w-1):if(w-1)<0thenw=0
  317. 4520 ifxx$="r"ande=1thengosub1180:goto3550
  318. 4530 ifxx$="r"ande=2thengosub1180:goto3630
  319. 4540 ifxx$="r"thengosub1180:goto3430
  320. 4550 ifval(xx$)=xthengosub540:ifb=3then5030
  321. 4560 ifval(xx$)=xthen4130
  322. 4570 poke781,19:sys59903:ifg=3thengosub5170:gosub6060:goto4640
  323. 4590 ifk=1thenk=0
  324. 4600 iffl=1thenfl=0:goto4620
  325. 4610 gosub6160
  326. 4620 pp=1:rr=1:zz=zz+1:c1=1500:w1=33:u1=17:l1=33:a1=15:gosub5240
  327. 4640 fort=1to2500:next:gosub4650:goto4150
  328. 4650 poke53269,peek(53269)and(254):poke781,22:sys59903:poke781,16:sys59903
  329. 4670 ifs=1thenprint"":ifzz=0thens=0:print"[145][145][145][145][145]":return
  330. 4680 ifpp<>1then4730
  331. 4690 ifcp=1thencp=0:goto4710
  332. 4700 print"[153]"z"[157] right out of"zz"  ";:printint((z/zz)*100)"[157]%  "
  333. 4710 ifg>1andct=1andcv=1thenprint"[145][145]":goto4730
  334. 4720 ifct=1andcv=1thenprint"[145]"
  335. 4730 poke781,19:sys59903:ifcc=1thencc=0:return
  336. 4740 ifrr<>1then4770
  337. 4750 ift$(w)<>"r"thenprint"[158] your wrong answer: "t$(w):poke781,15:sys59903
  338. 4760 poke198,0:fs=fs+1:ifpp=1thencj=0
  339. 4770 ifs=1thenprint"[145][145][145][145][145][145][145][145]":s=0:ifpp=0andrr=0thenprint""
  340. 4780 ifcj=1andcv=1thenprint"[145]"
  341. 4790 return
  342. 4800 ifln<>0thenprintchr$(20);
  343. 4810 ln=ln-1:ifln<0thenln=0
  344. 4820 xx$=left$(xx$,ln):aa$=left$(aa$,ln):return
  345. 4840 print" your arabic number:                [157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][150]"x
  346. 4850 print"[145] ":ifs<>1thenc1=100:v1=10:w1=33:u1=34:l1=75:a1=15:gosub5240
  347. 4870 print"[153] change it":print" to a roman numeral.              ":ifs=1thengosub4670
  348. 4890 aa$="":return
  349. 4910 ifaa$=""thenw=w-1:if(w-1)<0thenw=0
  350. 4920 ifaa$=""then4280
  351. 4930 t$(w)=aa$:print"":ifaa$="q"thendd=1:g=0:w=0:cv=0:cj=0:ct=0:goto3160
  352. 4950 ifaa$="r"thenv=1:cv=1:s=1:print"[147][153] roman numerals."
  353. 4960 ifaa$="r"thent$(w)=t$(w-1):if(w-1)<0thenw=0
  354. 4970 ifaa$="r"ande=1andb=4thengosub1180:goto3550
  355. 4980 ifaa$="r"ande=2andb=4thengosub1180:goto3630
  356. 4990 ifaa$="r"thengosub1180:goto3490
  357. 5000 ifaa$=a$and(b=1orb=2)thengosub540:goto4130
  358. 5010 ifaa$=a$thengosub540:goto5030
  359. 5020 return
  360. 5030 f=int(rnd(0)*100)+1:iff/2=int(f/2)thenf=1:goto4140
  361. 5050 f=2:ifb=4thenb=3:goto4140
  362. 5070 b=4:goto4140
  363. 5090 ifb=2orb=4thenprint"[150] answer is: "a$"[146]  wait. ":goto5110
  364. 5100 ifb=1orb=3thenprint"[150] answer is:"x"[146][157]  wait. "
  365. 5110 rr=0:c1=1500:w1=33:u1=34:l1=75:a1=15:jt=220:v=53248
  366. 5112 fort=1to6:poke53288+t,7:nextt:fort=1to2200:nextt
  367. 5113 pokev+5,jt:pokev+7,jt:pokev+9,jt:pokev+11,jt:pokev+13,jt:pokev+15,jt
  368. 5114 foryt=1to3:poke53269,252:jj=1:gosub990:poke53269,0:fort=1to50:nextt
  369. 5116 nextyt:fort=1to700:nextt:gosub5240:poke781,19:sys59903:return
  370. 5170 poke53248+29,1:poke53269,peek(53269)or1:iffl=1thenprint"[145][145][145]"
  371. 5180 zz=zz+1:poke214,17:print:poke211,0:print"[153]"z"[157] right out of"zz"  ";:printint((z/zz)*100)"[157]%  "
  372. 5200 printtab(6)"[158]   still not right. (next problem)[145][145][145][145][145][145]":fl=0:ct=1:cp=1:f=0:return
  373. 5240 forr=54272to54295:poker,0:next:vl=54296:wf=54276:ad=54277:nh=54273:nl=54272
  374. 5260 pokevl,v1:pokewf,w1:pokead,a1:pokenh,u1:pokenl,l1:forn=1toc1:next:c1=0:pokenl,0:pokenh,0:pokead,0:return
  375. 5320 c1=150:u1=150:l1=24:forr=54272to54295:poker,0:next
  376. 5330 vl=54296:wf=54276:ad=54277:nh=54272:nl=54273:forcs=0to4
  377. 5350 pokevl,15:pokewf,17:pokead,15:pokenh,u1+(10*cs):pokenl,l1+(15*cs)
  378. 5360 ifd$="e"thengosub5400:forn=1to200:nextn:goto5380
  379. 5370 forn=1toc1:next:c1=c1+(125*cs):pokep1,2+cs:pokep2,2+cs
  380. 5380 nextcs:pokenl,0:pokenh,0:pokead,0:pokep1,6:pokep2,6
  381. 5400 ifd$="e"andcs<6thenpoke646,cs+1
  382. 5410 ifd$="e"thenpoke214,3:print:poke211,10:print"mcmlxxxviii = 1988!"
  383. 5420 ifcs=4andd$="e"thenprint"":cs=cs+1:goto5410
  384. 5430 return
  385. 5530 ::v=53248:pokev+40,7:forsp=0to7:poke2040+sp,32+sp:next:qr=2112:gosub5972
  386. 5570 data255,255,255,128,0,1,128,0,1:data128,0,1,134,0,97,134,0,97
  387. 5590 data128,0,1,128,0,1,128,0,1:data128,24,1,128,24,1,128,0,1
  388. 5610 data128,0,1,132,0,33,130,0,65:data129,0,129,128,129,1,128,126,1
  389. 5630 data128,0,1,128,0,1,255,255,255,255:pokev+2,36:pokev+3,220
  390. 5670 qr=2048:gosub5972:data255,255,255,128,0,1,128,0,1:data128,0,1,134,0,97,134,0,97
  391. 5710 data128,0,1,128,0,1,128,0,1:data128,24,1,128,24,1,128,0,1
  392. 5730 data128,0,1,128,0,1,128,255,1:data130,0,129,130,0,65,132,0,33
  393. 5750 data132,0,33,128,0,1,255,255,255,255:pokev,36:pokev+1,220:qr=2176:gosub5972
  394. 5790 data0,0,0,0,0,0,0,0,0,30,1,255,63,1,153,99,128,24,65,128,24,65,128,24
  395. 5800 data1,128,24,3,12,24,6,12,24,12,0,24,12,0,24,12,0,24,0,0,24,0,0,24
  396. 5810 data12,1,153,12,1,255,0,0,0,0,0,0,0,0,0,255:qr=2240:gosub5972
  397. 5820 data0,0,0,0,0,0,0,0,0,135,128,15,135,128,15,1,128,12,1,128,12,0,192,24
  398. 5830 data48,192,24,48,96,48,0,96,48,0,48,96,0,48,96,0,24,192,0,24,192,0,13,128
  399. 5840 data128,31,192,128,31,192,0,0,0,0,0,0,0,0,0,255:qr=2304:gosub5972
  400. 5850 data0,0,0,0,0,0,0,0,0,126,31,143,16,6,6,24,12,6,12,24,6,6,48,6
  401. 5860 data99,97,134,097,193,134,0,192,6,1,224,6,3,48,6,6,24,6,12,12,6,24,6,6
  402. 5870 data126,31,143,126,31,143,0,0,0,0,0,0,0,0,0,255:qr=2368:gosub5972
  403. 5880 data0,0,0,0,0,0,0,0,0,192,0,31,192,0,59,0,0,192,0,1,128,0,3,128
  404. 5890 data0,195,0,0,195,0,0,3,0,0,3,0,0,3,0,0,3,128,2,1,128,2,0,192
  405. 5900 data254,0,59,254,0,31,0,0,0,0,0,0,0,0,0,255:qr=2432:gosub5972
  406. 5910 data0,0,0,0,0,0,0,0,0,193,252,0,193,246,0,64,51,0,0,49,128,0,48,192
  407. 5920 data0,48,64,12,48,102,12,48,102,0,48,96,0,48,64,0,48,192,0,49,128,64,51,0
  408. 5930 data193,246,0,193,254,0,0,0,0,0,0,0,0,0,0,255:qr=2496:gosub5972:goto5975
  409. 5940 data0,0,0,0,0,0,0,0,0,240,240,60,121,224,126,121
  410. 5950 data224,199,111,96,131,102,96,131,102,96,3,96,102,6,96,102
  411. 5960 data12,96,96,24,96,96,24,96,96,24,96,96,0,96,96,0
  412. 5970 data240,240,24,240,240,24,0,0,0,0,0,0,0,0,0,255
  413. 5972 forn=0to63:readq:pokeqr+n,q:next:return
  414. 5975 x=1:forct=1to8:pokev+29,x:x=x*2:nextct:goto190
  415. 5990 ::fort=1to200:nextt:tm=0:forsp=1to4:v1=9:c1=400:u1=67:l1=12:a1=15:w1=17
  416. 6020 forsp=1to4:poke214,13:print:poke211,17+ln:print" [146][157]":gosub5240
  417. 6030 poke214,13:print:poke211,17+ln:print" [157]";:fortv=1to50:nexttv:nextsp:return
  418. 6060 ::ck=54272:pokeck+4,0:pokeck+6,240:poke54296,3:poke54295,0:pokeck+1,4:pokeck+5,0:pokeck+4,33
  419. 6100 forzp=5024to100step-75:pokeck+1,zp/256:pokeck,zpand255:nextzp:pokeck+4,0:return
  420. 6160 ::en=int(rnd(0)*13+1)
  421. 6180 onengoto6190,6200,6210,6220,6230,6240,6250,6260,6270,6280,6290,6300,6310
  422. 6190 print"[150] sorry, not right. do try again.":return
  423. 6200 print"[150] nice try... but you can do better.":return
  424. 6210 print"[150] well... give it another go.  ":return
  425. 6220 print"[150] nope. now give it your best. ":return
  426. 6230 print"[150] good answer... but it's not right. ":return
  427. 6240 print"[150] that's not right. (but don't give up!)":return
  428. 6250 print"[150] no. you'll just have to try again.":return
  429. 6260 print"[150] this is not right. try one more time. ":return
  430. 6270 print"[150] incorrect. can you do better?":return
  431. 6280 print"[150] no. no. no. think. then go again. ":return
  432. 6290 print"[150] no. give it some extra thought.":return
  433. 6300 print"[150] wrong. how about another try?":return
  434. 6310 print"[150] that's not it. review roman numerals?":return
  435. 6340 pokep1,5:pokep2,5:pokea,9:print"[147] display option"
  436. 6360 print" for your roman numeral instructons,"
  437. 6370 print" you can use a step-by-step screen       display...or"
  438. 6380 print" you can go full-screen instead":printtab(10)" select: (s/f)"
  439. 6400 printtab(9)" s[146] step-by-step":printtab(9)" f[146] full-screen":c1=100:gosub5240
  440. 6420 gets$:ifs$=""then6420
  441. 6430 ifs$="s"thenpokep1,3:pokep2,3:return
  442. 6440 ifs$="f"thenk1=1:pokep1,3:pokep2,3:return
  443. 6450 goto6420
  444. 6460 ::fort=1to700:next:poke54272,0:poke54273,0:poke54274,0:poke54275,8:poke54278,240:poke54296,3
  445. 6510 poke54277,0:poke54276,65:forf=0to38535step1000:h=int(f/256):l=int(f-(256*h))
  446. 6522 poke54272,l:poke54273,h:fort=1to20:next:next:fori=1to20:poke54296,0:forio=1to10:poke54296,2:nextio:nexti
  447. 6525 fort=1to100:nextt:poke54276,0:return
  448. 7000 print"are you sure you want to quit? (y/n)[145]"
  449. 7005 geta$:ifa$<>"y"anda$<>"n"then7005
  450. 7006 ifa$="y"then7010
  451. 7007 print"                                    ":return
  452. 7010 open15,8,15,"r0:hello connect=hello connect":input#15,er,er$:close15
  453. 7020 if er<>63 then print"[147]":end
  454. 7030 poke44,8:poke2048,.:load"hello connect",8
  455.