home *** CD-ROM | disk | FTP | other *** search
Wrap
5 rem **** fractions to decimals **** 10 poke 53280,0:poke 53281,0:print"[147]"; 12 poke 45,peek(174):poke 46,peek(175):clr 15 gn$="[198]ractions to [196]ecimals" 17 gosub 5000 20 for z=54272 to 54296:poke z,.:next:ford=1to6:readre$(d):next 25 data "[199]reat!","[198]antastic!","[211]uper!","[217]ou've got it!" 26 data "[217]es! [217]es! [217]es!","[212]hat's [199]reat!" 28 forx=0to7:reada:poke30936+x,a:poke31056+x,peek(29320+x):next 30 data 0,128,192,224,240,224,192,128 40 get a$:ifa$<>" " then 40 95 goto 2000 100 rem *** zippy titles *** 105 rem ln=line# to place text 110 poke646,11:lc=(23-ln)/3 115 tb=(40-len(tx$))/2 120 ford=23tolnstep-1:print""; 125 ford1=1tod:print"";:next 130 ifd/6=int(d/6)then gosub165 135 printtab(tb)tx$ 140 next 145 ford=23toln+1step-1:print""; 150 ford1=1tod:print"";:next 155 printtab(11)" " 160 next:return 165 ifpeek(646)=15thenpoke646,1 170 ifpeek(646)=12thenpoke646,15 175 ifpeek(646)=11thenpoke646,12 180 return 200 rem *** clear *** 210 for er=lnto23:poke 781,er:sys 59903:next:return 300 rem 305 rem *** reward sound *** 310 rem 320 poke 53280,2:poke 53281,2 325 s=54272:pokes+24,7:pokes+1,110:pokes+5,9:pokes+6,10:pokes+4,17:pokes+4,16 330 for d=1 to 25:next 332 poke 53280,5:poke 53281,5 335 s=54279:pokes+24,7:pokes+1,110:pokes+5,9:pokes+6,10:pokes+4,17:pokes+4,16 340 for d=1 to 25:next 342 poke 53280,6:poke 53281,6 345 s=54286:pokes+24,7:pokes+1,110:pokes+5,9:pokes+6,10:pokes+4,17:pokes+4,16 350 for d=1 to 25:next 352 poke 53280,0:poke 53281,0 355 sc=sc+1 365 return 400 rem 405 rem *** get numeric input *** 410 j$="":print"[164]"; 415 get a$:if a$="" then 415 420 if a$=chr$(13) then print"[157] ":j=val(j$):mx=0:return 425 if a$=chr$(20) and j$="" then 415 430 if a$=chr$(20) then j$=left$(j$,len(j$)-1):print"[157][157] [157][157][164]";:goto 415 433 if a$="[140]" then 470 435 if a$<" " or a$>"[218]" then 415 440 if a$>"z" and a$<"[193]" then 415 445 if a$=chr$(34) then 415 450 if len(j$)=mx then 415 455 print"[157] [157]"a$"[164]"; 460 j$=j$+a$:goto 415 470 gosub 480:ln=1:tx$="[197]xit to [213]p[212]ime" 475 gosub 100:gosub 800:goto 4062 480 rem *** print screen header *** 481 print"[147]":poke53287,2:poke53288,12:poke53248,38:poke53249,56:poke 53250,38 482 poke 53251,56 485 forx=0to1:poke53277,peek(53277)or(2^x):poke 53271,peek(53271)or(2^x) 490 poke 53269,peek(53269)or(2^x):next 495 print"":return 499 forx=0to2:poke53269,peek(53269)and(255-2^x):next:return 500 rem ** short wrong sound ** 505 wn$="028":s=54272:pokes+6,96:pokes+24,15 510 forq=1to6 step3 515 pokes+1,val(mid$(wn$,q,2)):pokes+4,33 520 forjw=1tot*val(mid$(wn$,q+2,1)):next:forr=1to100:next 525 pokes+4,0:next:return 600 rem 605 rem *** general purpose delay *** 610 rem 615 for qd=1 to 600:next 620 return 800 rem *** title bars *** 805 print"";: 810 print"[159][192][157][157][156][183][183][145][145]"; 815 forx=1to23:print"[154][175][157][159][192][157][156][183][145][145]";:next 820 print"[154][175][175][157][157][159][192]":return 850 print"[154]";:goto 855 855 print""; 860 print"[172][192][192][192][192][192][187]" 865 forjw=1to3:print"[221][221]":next 870 print"[173][192][192][192][192][192][189]" 871 ifsf=1andop=4thensf=0:goto874 872 ifop=4thenreturn 874 print"[156][172][192][192][192][192][192][192][192][192][192][192][187]" 876 forjw=1to3:print"[221][221]":next 878 print"[173][192][192][192][192][192][192][192][192][192][192][189]" 880 return 900 rem *** continue or exit *** 902 print"";:ford=1to24:print"";:next 905 print"[154][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]" 925 s=54272:pokes+24,7:pokes+1,110:pokes+5,9:pokes+6,10:pokes+4,17:pokes+4,16 930 getrc$:ifrc$=""then930 940 ifrc$="_"thencp=cp+1:goto 4000 950 ifrc$<>chr$(13)then930 960 return 980 print"";:forjg=1toy:print"";:nextjg:printtab(x);tx$;:return 990 x=(40-len(tx$))/2:goto980 1000 rem *** option 2 input *** 1005 nu$=str$(nu) 1010 j$="":ifop=3thenj$="." 1011 fordd=2tolen(nu$):mu=0 1014 tx$="":gosub980 1016 geta$:print"*[157] [157][159]*[157] [157][156]*[157] [157]*[157] [157]*[157] [157][158]*[157] [157][150]*[157] [157][153]*[157] [157][154]*[157] [157]";:ifa$=""then1016 1017 print"[146]" 1018 ifop>2thenj$=j$+a$:goto1050 1020 ifa$=mid$(nu$,dd,1)then1045 1035 gosub500:mu=mu+1:ifmu<>3then1014 1045 tx$=mid$(nu$,dd,1):gosub980:x=x+1:next:return 1050 ifop>2anda$=chr$(20)thenx=x-1:tx$=" ":gosub980:dd=dd-2 1051 ifop>2anda$=chr$(20)thenj$=left$(j$,len(j$)-2):next:return 1055 ifop>2thentx$=a$:gosub980:x=x+1:next:return 1100 rem *** wrong sound *** 1105 wn$="042034":s=54272:pokes+6,96:pokes+24,15 1110 forq=1to6 step3 1115 pokes+1,val(mid$(wn$,q,2)):pokes+4,33 1120 forjw=1tot*val(mid$(wn$,q+2,1)):next:forr=1to300:next 1125 pokes+4,0:next:return 2000 rem 2005 rem *** main program *** 2010 rem 2015 gosub480:ln=1:tx$="[198]ractions to [196]ecimals" 2016 print"";:gosub 100:gosub800 2017 tx$="[151] [208]ublished by [211]oftdisk [208]ublishing, [201]nc.":x=0:y=24:gosub 980 2020 x=0:y=10 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] " 2027 tx$=tx$+" [157][157][157][157][157][157][157]":gosub 980 2030 mx=1:gosub400:i$=j$:ifi$="y"thengosub30000 2035 ifi$<>"n"andi$<>"y"thenprint"[145]";:goto2025 2038 ln=5:gosub200 2040 y=10:x=0:tx$="[215]hat is your name? " 2045 gosub 980:mx=20:gosub 400:nn$=j$:gosub200 2050 x=0:y=10:tx$="[215]hich option do you want:" 2053 gosub 980 2055 tx$=" 1. [196]emonstration.":y=12:gosub980 2060 tx$=" 2. [215]ork examples with help.":y=13:gosub980 2065 tx$=" 3. [211]tep-by-step problems.":y=14:gosub980 2068 tx$=" 4. [193]nswers only.":y=15:gosub980 2070 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:gosub980:mx=1:gosub400 2071 op=j: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] " 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] " 2073 ifop<>1andop<>2andop<>3andop<>4then2070 2074 tx$="[200]ow many problems? "+np$:y=19:gosub980:mx=2:gosub400:np=j 2075 ifop=1then2078 2076 ifnp<5ornp>20then2074 2077 goto 2079 2078 ifnp<1ornp>5then2074:gosub900 2079 forcp=1tonp:ln=5:gosub200:gosub850 2082 n=int(rnd(1)*8)+1:d=int(rnd(1)*8)+2:an=n/d:ifan>=1then2082 2084 an$=str$(an):iflen(an$)>5andint(rnd(1)*2)+1=1then2082 2086 iflen(an$)>5thenan=val(left$(an$,5)) 2088 tx$="[195]hange this fraction":x=0:y=8:gosub980:tx$="to a decimal.":y=9 2090 gosub980:tx$=str$(n):x=30:y=7:gosub980:tx$="[192][192][192]":y=8:x=30:gosub980 2092 tx$=str$(d):y=9:x=30:gosub980 2094 an$=str$(an):d$=str$(d):n$=str$(n) 2096 iflen(an$)=5then2098 2097 fordd=1to(5-len(an$)):an$=an$+"0":next 2098 onopgosub2100,2200,2200,2400:gosub900:nextcp:goto4000 2100 rem *** demonstration *** 2104 gosub 600:gosub600 2105 tx$="[196]ivide the numerator":x=0:y=12:gosub980:gosub600 2110 tx$=n$+"[157][157][221].":y=14:x=26:gosub980:tx$="[176][192][192][192][192][192][192]":y=13:gosub980:gosub600 2120 tx$="by the denominator.":x=0:y=13:gosub980:gosub600 2125 tx$=d$:y=14:x=24:gosub980:gosub600 2130 tx$="[193]dd three zeros after":x=0:y=15:gosub980 2135 tx$="the decimal point.":y=16:gosub980:gosub600 2140 forx=29to31:y=14:tx$="0":fordd=1to200:next:gosub980:next 2145 tx$="[208]lace the decimal point for the answer.":x=0:y=18:gosub980:gosub600 2150 tx$=".":y=12:x=28:gosub980:gosub600 2155 tx$="[206]ow divide.":x=0:y=20:gosub980:gosub600 2160 fordd=3tolen(an$):tx$=mid$(an$,dd,1):x=26+dd:y=12:gosub980 2165 forbb=1to200:next:next 2167 ifsy=1thensy=0:op=1 2170 return 2200 rem *** with help *** 2205 tx$="[196]ivide the numerator":x=0:y=12:gosub980 2210 tx$="by the denominator.":x=0:y=13:gosub980 2215 tx$="[221]":y=14:x=26:gosub980:tx$="[176][192][192][192][192][192][192]":y=13:gosub980 2220 tx$="[197]nter the numerator.":x=0:y=15:gosub980:nu=n:y=14:x=27:gosub1000 2222 tx$=".":x=28:y=14:gosub980 2225 tx$="[197]nter the denominator.":x=0:y=15:gosub980:nu=d:y=14:x=25:gosub1000 2230 tx$="[193]dd three zeros after ":x=0:y=15:gosub980 2235 tx$="the decimal point.":y=16:gosub980:gosub600 2240 forx=29to31:y=14:tx$="0":fordd=1to200:next:gosub980:next 2245 tx$="[208]lace the decimal point for the answer.":x=0:y=18:gosub980:gosub600 2250 tx$=".":y=12:x=28:gosub980:gosub600 2255 tx$="[206]ow divide.":x=0:y=20:gosub980 2260 nu$=right$(an$,4):x=29:y=12:gosub1010:ifop=3then2300 2270 return 2300 rem *** step by step *** 2305 ifval(j$)=val(an$)then2340 2310 gosub 1100:tx$="[212]he correct answer is"+an$+".":y=20:x=0:gosub980 2315 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] " 2320 x=0:y=22:gosub980:mx=1:gosub400:ifj$="n"thenreturn 2325 ifop=4thensf=1 2326 ln=5:gosub200:gosub850 2328 tx$="[195]hange this fraction":x=0:y=8:gosub980:tx$="to a decimal.":y=9 2330 gosub980:tx$=str$(n):x=30:y=7:gosub980:tx$="[192][192][192]":y=8:x=30:gosub980 2331 tx$=str$(d):y=9:x=30:gosub980 2332 gosub600:goto 2105 2340 tx$=re$(int(rnd(1)*6)+1):gosub300:y=22:ifop=4theny=16 2345 gosub990:gosub600:return 2400 rem *** answers only *** 2410 tx$="[197]nter the decimal:":x=0:y=12:gosub980:nu$=right$(an$,5) 2415 x=19:y=12:gosub1010:goto 2300 4000 rem 4005 rem *** print score and give *** 4010 rem *** option of playing *** 4015 rem *** again *** 4020 rem 4025 cp=cp-1:ln=5:gosub200 4030 ifop<3then4062 4035 tx$="[217]ou got"+str$(sc)+" right out of"+str$(cp)+" problems." 4037 y=10:x=0:gosub980 4038 sc=int((sc/cp)*100):ifsc>100thensc=100 4040 tx$="[212]hat makes"+str$(sc)+" percent.":y=12:x=0:gosub980 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 4065 x=0:y=15:gosub980:mx=1:gosub400 4067 ifj$="y"then 4100 4070 sc=0: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]" 4075 x=0:y=17:gosub980:mx=1:gosub400:ifj$="y"then 2000 4080 sys 8*4096+4 4100 gosub480:ln=1:tx$="[198]raction to [196]ecimals" 4110 gosub100:gosub800:tx$="[151] [208]ublished by [214]iking [212]echnologies, [201]nc." 4120 x=0:y=24:gosub 980:goto 2050 5000 print"[142]";:gosub 480:ln=1:tx$="vision software":gosub 100 5010 ln=2:tx$="and uptime presents":gosub 100 5020 gosub 5200 5030 print"[158] [161][172][162][146][190][161][172][187][146][187] [190][188][146] [172][172][187][146][187][188][187][172][146][190][188] [146][190][172][172][187][146][187][161][188][161][146][161][172][172][187][146][187]" 5040 print" [161][188][146][187] [161][188][190][146][190][161][188][190][146][161][161][146][161] [161][146][161] [146] [161][146][161][161][146][161][161] [146][161][188][188][146][162]" 5050 print" [161][146][161] [161][172][188][146] [161][146][161][161][146][161][161][146][161][172][187] [161][146][161] [146] [161][146][161][161][146][161][161][146][161][187][146][161][172][187][161][146][161]" 5060 print" [188][190] [188][190][188][190][188][190][188][190] [162][162][146] [188][190] [188][162][146][190] [162][162][146] [188][190][188][190] [162][162]" 5070 printtab(17)"[187][146][190] [191][146][191]" 5080 printtab(17)"[161][146] [191][191]" 5100 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]" 5110 print" [161][146][161][161][146][161][161][188][146][187][146] [161][146][161] [146] [161][172][172] [161][188][190][146][161][161][146][161] [188][188][146][162]" 5120 print" [161][146][161][190][146][190][161][146][161] [161][146][161][172][187] [146] [161][146][161] [161][146][161][161][146][161][161][146][161] [172][187][161][146][161]" 5130 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]" 5140 poke 198,0 5150 printtab(7)"[159]press spacebar to continue" 5160 print"[151] published by softdisk publishing, inc." 5170 return 5200 print""; 5210 print"[159][192][157][157][156][183][183][145][145]"; 5220 forx=1to23:print"[154][175][157][159][192][157][156][183][145][145]";:next 5230 print"[154][175][175][157][157][159][192]":return 5999 end 30000 rem 30005 rem *** instructions *** 30010 rem 30015 gosub480:ln=1:tx$="[201] n s t r u c t i o n s":gosub 100:gosub800 30020 print" [204]earn to convert fractions to" 30025 print"decimal numbers with ease! [212]here" 30030 print"are four ways to use this program:" 30038 print" [207]ptions[157][157][157][157][157][157][157][163][163][163][163][163][163][163]" 30040 print" 1. [196]emonstration." 30042 print" 2. [215]ork examples with help." 30043 print" 3. [211]tep-by-step problems." 30044 print" 4. [193]nswers only." 30045 gosub 33000 30055 print" [207]ption 1: [196]emonstration." 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]" 30060 print" [201] will show you, step by step," 30062 print"how to convert a fraction into a" 30065 print"decimal number. [201] will explain each" 30070 print"step as [201] go." 30080 gosub 33000 30090 print" [207]ption 2: [215]ork examples with help." 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]" 30095 print" [201] will give you a fraction, and" 30100 print"you must convert it into a decimal" 30105 print"number. [215]e will work the problems" 30110 print"together, and [201] will guide you":print"through each step." 30111 print" [201]f you enter a wrong answer, [201]" 30112 print"will correct you." 30115 gosub 33000 30125 print" [207]ption 3: [211]tep-by-step." 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]" 30130 print" [207]n option 3, [201] will allow you " 30135 print"to work the whole problem by yourself" 30140 print"for practice. [201]f your final answer" 30142 print"is wrong, [201] will work the problem with" 30145 print"you. [201] will keep your score on this" 30150 print"option.":gosub33000 30151 print" [207]ption 4: [193]nswers only." 30152 print" [163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163]" 30153 print" [215]ith answers only, you must find" 30154 print"the answer all by yourself, without" 30155 print"my help. [217]ou may need paper and" 30156 print"and a pencil on this option." 30157 print" [196]o your best, because [201] will be" 30158 print"keeping your score!":gosub33000 30160 print" [206]umber of [208]roblems" 30162 print" [163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163]" 30165 print" [217]ou will decide how many problems" 30170 print"to do. [201]f you choose option 1, you" 30175 print"may only have 5 problems; otherwise," 30180 print"you may have from 5 to 20 problems." 30185 gosub 33000 30187 gosub480:ln=1:tx$="[198]ractions to [196]ecimals":gosub 100:gosub800 30190 tx$="[151] [208]ublished by [214]iking [212]echnologies, [201]nc.":x=0:y=24:gosub 980 30200 return 33000 rem *** continue instructions *** 33005 tx$="[159][169][208]lease [208]ress [193]ny [203]ey[146][169]":y=24:gosub990 33010 getwe$:ifwe$=""then33010 33015 ln=5:gosub200:print"":return