Genlotto |
|
| CODICE 'Forum Superlotto || 29.08.2011 'Morenish M Sub main() Dim ruota(2),posta(5) Dim nu(5) posta(1)=1 :posta(2)=0
ee=CInt(InputBox("Quante estrazioni vuoi esaminare ?","Estrazioni",100)) clp=CInt(InputBox("Per quante estrazioni deve durare il gioco ?","Colpi di gioco",9))
casi=0 fin=EstrazioneFin ini=fin-ee For es=ini To fin Messaggio "elab. n° "&es&" del "&dataestrazione(es)&" [ by Genlotto ]" For r1=1 To 9 For r2=r1+1 To 10 For p1=1 To 4 :p2=p1+1 a=Estratto(es,r1,p1) :b=Estratto(es,r1,p2) ds1=Distanza(a,b) :f1=Figura(a) :f2=Figura(b) c=Estratto(es,r2,p1) :d=Estratto(es,r2,p2) ds2=Distanza(c,d) :f3=Figura(c) :f4=Figura(d) smf=(f1+f2+f3+f4) If ds1=ds2 And smf=ds1 Then s1=Fuori90(a+b) :s2=Fuori90(c+d) :s3=Fuori90(a+c) s4=Fuori90(b+d) :s5=Fuori90(a+d) :s6=Fuori90(b+c) If s1=s2 Then ok=s1 If s3=s4 Then ok=s3 If s5=s6 Then ok=s5 nu(1)=ok casi=casi+1:Scrivi String(75,"="),1 Scrivi DataEstrazione(es,1)&" [ "&SiglaRuota(r1)&" - "&stringaestratti(es,r1)&_ " ] [ "&Format2(a)&"."&Format2(b)&" in "&p1&"/"&p2&" ^ pos ] Ds "&ds1&"|Fg "&f1&"."&f2 Scrivi DataEstrazione(es,1)&" [ "&SiglaRuota(r2)&" - "&stringaestratti(es,r2)&_ " ] [ "&Format2(c)&"."&Format2(d)&" in "&p1&"/"&p2&" ^ pos ] Ds "&ds2&"|Fg "&f3&"."&f4 Scrivi String(75,"-") ColoreTesto 2 :Scrivi "La Distanza uguale è: "&ds1,1,0 :ColoreTesto 0 ColoreTesto 1 :Scrivi " | La somma delle figure è:("&f1&"+"&f2&"+"&f3&"+"&f4&") = "&smf,1 :ColoreTesto 0 Scrivi "Ambata "&nu(1) Scrivi String(64,"-")&" caso n° "&(casi) '------------------------------------ ruota(1)=r1 :ruota(2)=r2 ImpostaGiocata 1,nu,ruota,posta,clp Gioca es
End If Next Next Next Next ScriviResoconto End Sub
|
| |