home *** CD-ROM | disk | FTP | other *** search
- 10 s=664:ma=50:ba=1184:az=0:g=0:ge=0:k=0:z=0:x=0:y=0:v=0
- 20 dimf%(ma):goto80
- 30 :
- 40 print"[147]disk-optimizer ii":print"[197][197][197][197][197][197][197][197][197][197][197][197][197][197][197][197][197]
- 50 [153]"by markus naeher":[142]
- 60 :
- 70 [143] *** einlesen ***
- 80 [141]40:[153]"laengen der programme eingeben":[129]x[178]0[164]ma
- 90 [153]x[170]1"cmd. programm ";:[133]f%(x):[139]f%(x)[177][178]s[167][153]"onon":[137]90
- 100 [139]f%(x)[179]0[167]x[178]x[171]1:[153]"ononon":[137]90
- 110 [139]f%(x)[179][177]0[167][130]
- 120 az[178]x[171]1
- 130 :
- 140 [143] *** von gross nach klein ordnen ***
- 150 [129]x[178]0[164]az[171]1:g[178]0:[129]y[178]x[164]az:[139]f%(y)[177]g[167]g[178]f%(y):ge[178]y
- 160 [130]:f%(ge)[178]f%(x):f%(x)[178]g:[130]
- 170 [141]40:[129]x[178]0[164]az:[153]" "f%(x),:[130]:[153]"
- 180 :
- 190 rem *** suche nach kombinationen ***
- 200 open1,4:print#1,"disk-optimizer ii":dimk%(az*10,az),p%(az)
- 210 forz=1toaz-1:forx=0toz:p%(x)=x:next:v=z
- 220 rem ** ausgabe der momentanen konfiguration **
- 230 forx=p%(v)-1toaz:pokeba+10*x,32:next:forx=0toz:pokeba+10*p%(x),42:next
- 240 rem ** testen, ob aktuelle kombination als summe s ergibt, dann ausgabe **
- 250 g=0:forx=0toz:g=g+f%(p%(x)):next:print"summe :"g"[157] [145]":ifg<>sgoto270
- 260 forx=0toz:k%(k,p%(x))=1:print#1,f%(p%(x));:next:print#1:k=k+1:goto290
- 270 ifg<sandv=0goto320
- 280 rem ** naechste kombination ermitteln **
- 290 forx=zto0step-1:ifp%(x)=az-z+xthennext:goto320
- 300 v=x:p%(v)=p%(v)+1:ifx<zthenforx=v+1toz:p%(x)=p%(x-1)+1:next
- 310 goto230
- 320 g=0:forx=0toz+1:g=g+f%(az-x):next:ifg<sthennextz
- 330 ifg=sthenforx=az-z-1toaz:k%(k,x)=1:print#1,f%(x);:next:print#1:k=k+1
- 340 :
- 350 rem *** ausgabe der kombinationen als tabelle ***
- 360 ifk=0thenclose1:end
- 370 forx=0toaz:print#1,right$(" "+str$(f%(x)),len(str$(f%(0))));
- 380 fory=0tok-1:print#1,chr$(46-4*k%(y,x));:next:print#1:next:close1
-