Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 10 dim su(9,9),sh(9,9)
- 30 dim gx(9,9),gy(9,9)
- 40 dim n(9,9,9)
- 50 for i=1 to 12:h$=h$+chr$(17):next i:h$=chr$(19)+h$
- 55 k$=chr$(19)+chr$(18)+chr$(154)
- rem *** colori per lo schema
- 60 poke 53281,0
- 65 c(1)=155:c(2)=154:c(3)=28:c(4)=158:c(5)=5
- 70 c(6)=159:c(7)=156:c(8)=30:c(9)=150
- 80 for i=1 to 9
- 90 r$(i)=r$(i-1)+chr$(29):d$(i)=d$(i-1)+chr$(17)
- 95 next i
- 100 gosub 25000
- 110 print chr$(147)
- 120 for i=1 to 9:gx(i,0)=0:next i
- 150 for i=1 to 9
- 160 for j=1 to 9
- 170 x=sh(i,j)
- 180 gx(x,0)=gx(x,0)+1
- 190 gx(x,gx(x,0))=i:gy(x,gx(x,0))=j
- 200 next j
- 210 next i
- 420 gosub 19800
- rem *** tutte le note per tutte le caselle, tranne quelle piene
- 1000 for k=1 to 9:n(0,0,k)=9:next k
- 1010 for i=1 to 9
- 1020 for j=1 to 9
- 1030 u=1:n(i,j,0)=9:v=su(i,j)
- 1040 if v>0 then u=0
- 1050 for k=1 to 9:n(i,j,k)=u:next k
- 1060 next j:next i
- 1070 cf=0
- rem *** rimozione note per valori gia' in riga/colonna
- 1090 for i=1 to 9
- 1100 for j=1 to 9
- 1110 if su(i,j)>0 then gosub 11000
- 1115 rem print k$;"rimuovo note per valori iniziali";i;j;" "
- 1120 next j
- 1130 next i
- rem *** loop di elaborazione
- 1200 fl=0
- 1210 gosub 10000
- 1220 gosub 13000
- 1230 gosub 19800
- 1235 if fl=1 then gosub 19700
- 1240 if fl=1 then 1200
- 1250 fl=1:gosub 19700:if fl=0 then 9000
- 1260 fl=0:gosub 14000:if fl=1 then 1200
- rem *** fine elaborazione
- 9000 print:print int((ti-t)/60) "sec"
- 9010 print
- 9015 print:print " premi un tasto..."
- 9020 get l$:if l$="" then 9020
- 9999 goto 100
- rem *** cerca caselle con singole note
- 10000 for i=1 to 9
- 10010 for j=1 to 9
- 10015 rem print k$;"cerco celle con singole note ";i;j;" "
- 10020 if n(i,j,0)=0 then 10100
- 10030 l=0
- 10040 for k=1 to 9:if n(i,j,k) then l=l+1:p=k
- 10050 next k
- 10060 if l<>1 then 10100
- 10062 print chr$(19)+r$(j)+d$(i)+chr$(18)+chr$(c(sh(i,j)))+mid$(str$(p),2)
- 10065 print h$;p;" -> ("i;",";j;")"
- 10070 su(i,j)=p:n(i,j,0)=0:for k=1 to 9:n(i,j,k)=0:next k
- 10080 gosub 11000
- 10090 goto 10000
- 10100 next j:next i
- 10110 return
- rem *** rimuove le note attinenti al valore di una casella
- 11000 a=su(i,j):n(0,0,a)=n(0,0,a)-1
- 11005 q=sh(i,j):cf=cf+1
- 11010 for m=1 to 9
- 11020 n(m,j,a)=0
- 11030 n(i,m,a)=0
- 11040 x=gx(q,m):y=gy(q,m)
- 11050 n(x,y,a)=0
- 11060 n(i,j,m)=0
- 11080 next m
- 11085 fl=1
- 11090 return
- rem *** cerca le note che si ripetono una sola volta in riga/colonna/blocco
- 13000 fd=0
- 13010 for z=1 to 9
- 13020 rem print k$;"cerco singole note di ";z;" "
- 13030 for f=1 to 9
- 13040 fx=0:fy=0:fb=0
- 13050 for g=1 to 9
- 13060 if n(f,g,z) then fx=fx+1:v=g
- 13070 if n(g,f,z) then fy=fy+1:w=g
- 13075 if n(gx(f,g),gy(f,g),z) then fb=fb+1:u=g
- 13080 next g
- 13090 if fx=1 then i=f:j=v:goto 13150
- 13100 if fy=1 then i=w:j=f:goto 13150
- 13105 if fb=1 then i=gx(f,u):j=gy(f,u):goto 13150
- 13110 next f
- 13120 next z
- 13130 if fd=1 and cf<81 goto 13000
- 13140 return
- 13150 su(i,j)=z:n(i,j,0)=0
- 13160 for k=1 to 9:n(i,j,k)=0:next k
- 13170 gosub 11000
- 13180 fd=1:print chr$(19)+r$(j)+d$(i)+chr$(18)+chr$(c(sh(i,j)))+mid$(str$(z),2)
- 13190 print h$;z;" -> ("i;",";j;")"
- 13200 if cf=81 then return
- 13210 goto 13110
- rem *** 1av: controlla se una riga/colonna di note appartiene a un blocco
- 14000 for b=1 to 9
- 14010 for k=1 to 9
- 14015 rem print k$;"cerco r/c con note in un blocco";b;k;" "
- 14020 cx=0:cy=0
- 14030 a=2^(k-1)
- 14040 for m=1 to 9
- 14050 if n(gx(b,m),gy(b,m),k) = 0 goto 14110
- 14060 if cx=0 then cx=gx(b,m)
- 14070 if cy=0 then cy=gy(b,m)
- 14080 if cx<>gx(b,m) then cx=-1
- 14090 if cy<>gy(b,m) then cy=-1
- 14100 if cx+cy=-2 goto 14140
- 14110 next m
- 14120 if cx>0 then gosub 14300
- 14130 if cy>0 then gosub 14400
- 14140 next k
- 14150 next b
- 14160 return
- 14300 for j=1 to 9
- 14310 if sh(cx,j)=b then 14330
- 14320 if n(cx,j,k) then n(cx,j,k)=0
- 14330 next j
- 14340 fl=1:return
- 14400 for i=1 to 9
- 14410 if sh(i,cy)=b then 14430
- 14420 if n(i,cy,k) then n(i,cy,k)=0
- 14430 next i
- 14440 fl=1:return
- rem *** controlla se e' risolto
- 19700 for k=1 to 9
- 19710 if n(0,0,k)>0 then return
- 19760 next k
- 19770 fl=0
- 19780 return
- rem *** stampa lo schema
- 19800 print chr$(147)
- 19810 for i=1 to 9
- 19815 l$=""
- 19820 for j=1 to 9
- 19825 a=su(i,j)
- 19830 a$=" ":if a then a$=mid$(str$(a),2)
- 19840 a$=chr$(18)+chr$(c(sh(i,j)))+a$
- 19850 l$=l$+a$
- 19860 next j
- 19865 print " "+l$;chr$(154)
- 19870 rem
- 19880 next i
- 19890 return
- rem *** SuBloku easy
- 20001 su(1,1)=9:su(1,2)=2:su(1,3)=1:su(1,4)=5:su(1,5)=6
- 20002 su(1,6)=0:su(1,7)=0:su(1,8)=0:su(1,9)=0
- 20003 su(2,1)=0:su(2,2)=0:su(2,3)=0:su(2,4)=0:su(2,5)=0
- 20004 su(2,6)=9:su(2,7)=6:su(2,8)=0:su(2,9)=2
- 20005 su(3,1)=0:su(3,2)=6:su(3,3)=0:su(3,4)=0:su(3,5)=0
- 20006 su(3,6)=0:su(3,7)=0:su(3,8)=2:su(3,9)=4
- 20007 su(4,1)=0:su(4,2)=1:su(4,3)=0:su(4,4)=0:su(4,5)=4
- 20008 su(4,6)=0:su(4,7)=0:su(4,8)=0:su(4,9)=9
- 20009 su(5,1)=0:su(5,2)=0:su(5,3)=5:su(5,4)=8:su(5,5)=0
- 20010 su(5,6)=1:su(5,7)=2:su(5,8)=0:su(5,9)=0
- 20011 su(6,1)=3:su(6,2)=0:su(6,3)=0:su(6,4)=0:su(6,5)=7
- 20012 su(6,6)=0:su(6,7)=0:su(6,8)=9:su(6,9)=0
- 20013 su(7,1)=1:su(7,2)=9:su(7,3)=0:su(7,4)=0:su(7,5)=0
- 20014 su(7,6)=0:su(7,7)=0:su(7,8)=4:su(7,9)=0
- 20015 su(8,1)=2:su(8,2)=0:su(8,3)=9:su(8,4)=6:su(8,5)=0
- 20016 su(8,6)=0:su(8,7)=0:su(8,8)=0:su(8,9)=0
- 20017 su(9,1)=0:su(9,2)=0:su(9,3)=0:su(9,4)=0:su(9,5)=2
- 20018 su(9,6)=3:su(9,7)=9:su(9,8)=8:su(9,9)=6
- 20019 sh(1,1)=1:sh(1,2)=1:sh(1,3)=1:sh(1,4)=1:sh(1,5)=1
- 20020 sh(1,6)=2:sh(1,7)=2:sh(1,8)=2:sh(1,9)=2
- 20021 sh(2,1)=1:sh(2,2)=1:sh(2,3)=1:sh(2,4)=3:sh(2,5)=3
- 20022 sh(2,6)=2:sh(2,7)=2:sh(2,8)=4:sh(2,9)=2
- 20023 sh(3,1)=1:sh(3,2)=3:sh(3,3)=3:sh(3,4)=3:sh(3,5)=2
- 20024 sh(3,6)=2:sh(3,7)=4:sh(3,8)=4:sh(3,9)=4
- 20025 sh(4,1)=5:sh(4,2)=3:sh(4,3)=3:sh(4,4)=3:sh(4,5)=3
- 20026 sh(4,6)=6:sh(4,7)=6:sh(4,8)=4:sh(4,9)=4
- 20027 sh(5,1)=5:sh(5,2)=5:sh(5,3)=6:sh(5,4)=6:sh(5,5)=6
- 20028 sh(5,6)=6:sh(5,7)=6:sh(5,8)=4:sh(5,9)=4
- 20029 sh(6,1)=5:sh(6,2)=5:sh(6,3)=6:sh(6,4)=6:sh(6,5)=7
- 20030 sh(6,6)=7:sh(6,7)=7:sh(6,8)=7:sh(6,9)=4
- 20031 sh(7,1)=5:sh(7,2)=5:sh(7,3)=5:sh(7,4)=8:sh(7,5)=8
- 20032 sh(7,6)=7:sh(7,7)=7:sh(7,8)=7:sh(7,9)=9
- 20033 sh(8,1)=8:sh(8,2)=5:sh(8,3)=8:sh(8,4)=8:sh(8,5)=7
- 20034 sh(8,6)=7:sh(8,7)=9:sh(8,8)=9:sh(8,9)=9
- 20035 sh(9,1)=8:sh(9,2)=8:sh(9,3)=8:sh(9,4)=8:sh(9,5)=9
- 20036 sh(9,6)=9:sh(9,7)=9:sh(9,8)=9:sh(9,9)=9
- 20040 return
- rem *** SuBloku medio
- 20101 su(1,1)=0:su(1,2)=0:su(1,3)=0:su(1,4)=0:su(1,5)=2
- 20102 su(1,6)=0:su(1,7)=7:su(1,8)=3:su(1,9)=0
- 20103 su(2,1)=1:su(2,2)=0:su(2,3)=0:su(2,4)=0:su(2,5)=0
- 20104 su(2,6)=9:su(2,7)=5:su(2,8)=0:su(2,9)=0
- 20105 su(3,1)=2:su(3,2)=4:su(3,3)=0:su(3,4)=0:su(3,5)=1
- 20106 su(3,6)=0:su(3,7)=0:su(3,8)=0:su(3,9)=0
- 20107 su(4,1)=0:su(4,2)=6:su(4,3)=0:su(4,4)=4:su(4,5)=0
- 20108 su(4,6)=2:su(4,7)=0:su(4,8)=0:su(4,9)=0
- 20109 su(5,1)=9:su(5,2)=0:su(5,3)=1:su(5,4)=0:su(5,5)=0
- 20110 su(5,6)=0:su(5,7)=3:su(5,8)=0:su(5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
- 20132 sh(7,6)=9:sh(7,7)=7:sh(7,8)=7:sh(7,9)=7
- 20133 sh(8,1)=8:sh(8,2)=8:sh(8,3)=6:sh(8,4)=9:sh(8,5)=9
- 20134 sh(8,6)=9:sh(8,7)=9:sh(8,8)=7:sh(8,9)=7
- 20135 sh(9,1)=8:sh(9,2)=8:sh(9,3)=8:sh(9,4)=8:sh(9,5)=8
- 20136 sh(9,6)=8:sh(9,7)=9:sh(9,8)=9:sh(9,9)=9
- 20140 return
- rem *** SuBloku difficile 1
- 20201 su(1,1)=0:su(1,2)=0:su(1,3)=0:su(1,4)=2:su(1,5)=0
- 20202 su(1,6)=1:su(1,7)=7:su(1,8)=0:su(1,9)=0
- 20203 su(2,1)=0:su(2,2)=1:su(2,3)=4:su(2,4)=0:su(2,5)=0
- 20204 su(2,6)=0:su(2,7)=0:su(2,8)=0:su(2,9)=0
- 20205 su(3,1)=0:su(3,2)=7:su(3,3)=0:su(3,4)=0:su(3,5)=4
- 20206 su(3,6)=0:su(3,7)=0:su(3,8)=0:su(3,9)=1
- 20207 su(4,1)=3:su(4,2)=0:su(4,3)=0:su(4,4)=0:su(4,5)=2
- 20208 su(4,6)=0:su(4,7)=0:su(4,8)=0:su(4,9)=6
- 20209 su(5,1)=0:su(5,2)=0:su(5,3)=8:su(5,4)=1:su(5,5)=0
- 20210 su(5,6)=3:su(5,7)=5:su(5,8)=0:su(5,9)=0
- 20211 su(6,1)=8:su(6,2)=0:su(6,3)=0:su(6,4)=0:su(6,5)=9
- 20212 su(6,6)=0:su(6,7)=0:su(6,8)=0:su(6,9)=3
- 20213 su(7,1)=1:su(7,2)=0:su(7,3)=0:su(7,4)=0:su(7,5)=3
- 20214 su(7,6)=0:su(7,7)=0:su(7,8)=7:su(7,9)=0
- 20215 su(8,1)=0:su(8,2)=0:su(8,3)=0:su(8,4)=0:su(8,5)=0
- 20216 su(8,6)=0:su(8,7)=9:su(8,8)=4:su(8,9)=0
- 20217 su(9,1)=0:su(9,2)=0:su(9,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)=2:su(1,5)=0
- 20302 su(1,6)=1:su(1,7)=7:su(1,8)=0:su(1,9)=0
- 20303 su(2,1)=0:su(2,2)=0:su(2,3)=4:su(2,4)=0:su(2,5)=0
- 20304 su(2,6)=0:su(2,7)=0:su(2,8)=0:su(2,9)=0
- 20305 su(3,1)=0:su(3,2)=7:su(3,3)=0:su(3,4)=0:su(3,5)=4
- 20306 su(3,6)=0:su(3,7)=0:su(3,8)=0:su(3,9)=1
- 20307 su(4,1)=3:su(4,2)=0:su(4,3)=0:su(4,4)=0:su(4,5)=2
- 20308 su(4,6)=0:su(4,7)=0:su(4,8)=0:su(4,9)=6
- 20309 su(5,1)=0:su(5,2)=0:su(5,3)=8:su(5,4)=0:su(5,5)=0
- 20310 su(5,6)=0:su(5,7)=5:su(5,8)=0:su(5,9)=0
- 20311 su(6,1)=8:su(6,2)=0:su(6,3)=0:su(6,4)=0:su(6,5)=9
- 20312 su(6,6)=0:su(6,7)=0:su(6,8)=0:su(6,9)=3
- 20313 su(7,1)=1:su(7,2)=0:su(7,3)=0:su(7,4)=0:su(7,5)=3
- 20314 su(7,6)=0:su(7,7)=0:su(7,8)=7:su(7,9)=0
- 20315 su(8,1)=0:su(8,2)=0:su(8,3)=0:su(8,4)=0:su(8,5)=0
- 20316 su(8,6)=0:su(8,7)=0:su(8,8)=4:su(8,9)=0
- 20317 su(9,1)=0:su(9,2)=0:su(9,3)=1:su(9,4)=9:su(9,5)=0
- 20318 su(9,6)=7:su(9,7)=0:su(9,8)=0:su(9,9)=0
- 20319 sh(1,1)=1:sh(1,2)=1:sh(1,3)=1:sh(1,4)=2:sh(1,5)=2
- 20320 sh(1,6)=2:sh(1,7)=2:sh(1,8)=2:sh(1,9)=2
- 20321 sh(2,1)=1:sh(2,2)=1:sh(2,3)=1:sh(2,4)=2:sh(2,5)=3
- 20322 sh(2,6)=3:sh(2,7)=3:sh(2,8)=3:sh(2,9)=2
- 20323 sh(3,1)=1:sh(3,2)=1:sh(3,3)=1:sh(3,4)=2:sh(3,5)=3
- 20324 sh(3,6)=3:sh(3,7)=4:sh(3,8)=3:sh(3,9)=3
- 20325 sh(4,1)=5:sh(4,2)=5:sh(4,3)=5:sh(4,4)=6:sh(4,5)=6
- 20326 sh(4,6)=4:sh(4,7)=4:sh(4,8)=3:sh(4,9)=4
- 20327 sh(5,1)=5:sh(5,2)=7:sh(5,3)=7:sh(5,4)=6:sh(5,5)=6
- 20328 sh(5,6)=6:sh(5,7)=4:sh(5,8)=4:sh(5,9)=4
- 20329 sh(6,1)=5:sh(6,2)=7:sh(6,3)=7:sh(6,4)=8:sh(6,5)=6
- 20330 sh(6,6)=6:sh(6,7)=6:sh(6,8)=9:sh(6,9)=4
- 20331 sh(7,1)=5:sh(7,2)=7:sh(7,3)=8:sh(7,4)=8:sh(7,5)=8
- 20332 sh(7,6)=6:sh(7,7)=9:sh(7,8)=9:sh(7,9)=4
- 20333 sh(8,1)=5:sh(8,2)=7:sh(8,3)=7:sh(8,4)=7:sh(8,5)=8
- 20334 sh(8,6)=9:sh(8,7)=9:sh(8,8)=9:sh(8,9)=9
- 20335 sh(9,1)=5:sh(9,2)=5:sh(9,3)=7:sh(9,4)=8:sh(9,5)=8
- 20336 sh(9,6)=8:sh(9,7)=8:sh(9,8)=9:sh(9,9)=9
- 20340 return
- rem *** sudoku easy
- 20401 su(1,1)=0:su(1,2)=0:su(1,3)=7:su(1,4)=0:su(1,5)=0
- 20402 su(1,6)=3:su(1,7)=9:su(1,8)=0:su(1,9)=2
- 20403 su(2,1)=0:su(2,2)=0:su(2,3)=0:su(2,4)=8:su(2,5)=0
- 20404 su(2,6)=0:su(2,7)=0:su(2,8)=0:su(2,9)=0
- 20405 su(3,1)=9:su(3,2)=4:su(3,3)=3:su(3,4)=0:su(3,5)=0
- 20406 su(3,6)=0:su(3,7)=0:su(3,8)=0:su(3,9)=7
- 20407 su(4,1)=6:su(4,2)=9:su(4,3)=0:su(4,4)=0:su(4,5)=0
- 20408 su(4,6)=0:su(4,7)=0:su(4,8)=0:su(4,9)=0
- 20409 su(5,1)=3:su(5,2)=0:su(5,3)=0:su(5,4)=5:su(5,5)=2
- 20410 su(5,6)=7:su(5,7)=0:su(5,8)=0:su(5,9)=0
- 20411 su(6,1)=0:su(6,2)=0:su(6,3)=0:su(6,4)=0:su(6,5)=0
- 20412 su(6,6)=0:su(6,7)=8:su(6,8)=4:su(6,9)=0
- 20413 su(7,1)=0:su(7,2)=0:su(7,3)=0:su(7,4)=0:su(7,5)=4
- 20414 su(7,6)=8:su(7,7)=0:su(7,8)=0:su(7,9)=0
- 20415 su(8,1)=2:su(8,2)=6:su(8,3)=0:su(8,4)=0:su(8,5)=0
- 20416 su(8,6)=0:su(8,7)=0:su(8,8)=0:su(8,9)=0
- 20417 su(9,1)=0:su(9,2)=0:su(9,3)=0:su(9,4)=0:su(9,5)=0
- 20418 su(9,6)=0:su(9,7)=1:su(9,8)=2:su(9,9)=9
- 20419 sh(1,1)=1:sh(1,2)=1:sh(1,3)=1:sh(1,4)=2:sh(1,5)=2
- 20420 sh(1,6)=2:sh(1,7)=3:sh(1,8)=3:sh(1,9)=3
- 20421 sh(2,1)=1:sh(2,2)=1:sh(2,3)=1:sh(2,4)=2:sh(2,5)=2
- 20422 sh(2,6)=2:sh(2,7)=3:sh(2,8)=3:sh(2,9)=3
- 20423 sh(3,1)=1:sh(3,2)=1:sh(3,3)=1:sh(3,4)=2:sh(3,5)=2
- 20424 sh(3,6)=2:sh(3,7)=3:sh(3,8)=3:sh(3,9)=3
- 20425 sh(4,1)=4:sh(4,2)=4:sh(4,3)=4:sh(4,4)=5:sh(4,5)=5
- 20426 sh(4,6)=5:sh(4,7)=6:sh(4,8)=6:sh(4,9)=6
- 20427 sh(5,1)=4:sh(5,2)=4:sh(5,3)=4:sh(5,4)=5:sh(5,5)=5
- 20428 sh(5,6)=5:sh(5,7)=6:sh(5,8)=6:sh(5,9)=6
- 20429 sh(6,1)=4:sh(6,2)=4:sh(6,3)=4:sh(6,4)=5:sh(6,5)=5
- 20430 sh(6,6)=5:sh(6,7)=6:sh(6,8)=6:sh(6,9)=6
- 20431 sh(7,1)=7:sh(7,2)=7:sh(7,3)=7:sh(7,4)=8:sh(7,5)=8
- 20432 sh(7,6)=8:sh(7,7)=9:sh(7,8)=9:sh(7,9)=9
- 20433 sh(8,1)=7:sh(8,2)=7:sh(8,3)=7:sh(8,4)=8:sh(8,5)=8
- 20434 sh(8,6)=8:sh(8,7)=9:sh(8,8)=9:sh(8,9)=9
- 20435 sh(9,1)=7:sh(9,2)=7:sh(9,3)=7:sh(9,4)=8:sh(9,5)=8
- 20436 sh(9,6)=8:sh(9,7)=9:sh(9,8)=9:sh(9,9)=9
- 20440 return
- rem *** sudoku difficile
- 20501 su(1,1)=0:su(1,2)=2:su(1,3)=0:su(1,4)=0:su(1,5)=0
- 20502 su(1,6)=0:su(1,7)=0:su(1,8)=8:su(1,9)=6
- 20503 su(2,1)=8:su(2,2)=0:su(2,3)=7:su(2,4)=0:su(2,5)=0
- 20504 su(2,6)=5:su(2,7)=0:su(2,8)=0:su(2,9)=0
- 20505 su(3,1)=0:su(3,2)=0:su(3,3)=3:su(3,4)=0:su(3,5)=4
- 20506 su(3,6)=0:su(3,7)=0:su(3,8)=0:su(3,9)=2
- 20507 su(4,1)=0:su(4,2)=5:su(4,3)=0:su(4,4)=7:su(4,5)=9
- 20508 su(4,6)=0:su(4,7)=0:su(4,8)=0:su(4,9)=0
- 20509 su(5,1)=0:su(5,2)=0:su(5,3)=1:su(5,4)=0:su(5,5)=5
- 20510 su(5,6)=0:su(5,7)=2:su(5,8)=0:su(5,9)=0
- 20511 su(6,1)=0:su(6,2)=0:su(6,3)=0:su(6,4)=0:su(6,5)=2
- 20512 su(6,6)=6:su(6,7)=0:su(6,8)=7:su(6,9)=0
- 20513 su(7,1)=5:su(7,2)=0:su(7,3)=0:su(7,4)=0:su(7,5)=3
- 20514 su(7,6)=0:su(7,7)=1:su(7,8)=4:su(7,9)=0
- 20515 su(8,1)=0:su(8,2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h(9,6)=8:sh(9,7)=9:sh(9,8)=9:sh(9,9)=9
- 20540 return
- 25000 print chr$(147)
- 25010 print:print:print
- 25020 print " 1. subloku facile"
- 25030 print " 2. subloku medio"
- 25040 print " 3. subloku difficile 1"
- 25050 print " 4. subloku difficile 2"
- 25060 print " 5. sudoku facile"
- 25070 print " 6. sudoku difficile"
- 25080 print
- 25090 print " 7. esci"
- 25100 print:print " scegli 1-7"
- 25110 get l$:if l$="" then 25110
- 25120 if l$<"1" or l$>"7" then 25110
- 25130 if l$="7" then end
- 25140 t=ti
- 25150 on val(l$) goto 20001,20101,20201,20301,20401,20501
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement