| Ecco il listato in l8 del metodo Somma 90 e Triplo 5
Sub main() Dim nu2(10),ruote(2),poste(2),pt(1),nu1(10) pt(1)=1 poste(2)=1 k=14 fin=EstrazioneFin ini=fin-100 For es=ini To fin AvanzamentoElab ini,fin,es For r1=1 To 10 For p1=1 To 5 n1=Estratto(es,r1,p1) For r2=r1+1 To 10 For q=1 To 5 n3=Estratto(es,r2,q) ds3=Fuori90(n1+n3) If ds3=90 And p1=q Then casi=casi+1 Scrivi String(75,"="),1 Scrivi DataEstrazione(es,1)&" < "& SiglaRuota(r1)&" "& StringaEstratti(es,r1)&_ " > ambo Somma <"& Format2(ds3)&" >"& Format2(n1)&"." Scrivi DataEstrazione(es,1)&" < "& SiglaRuota(r2)& " "& StringaEstratti(es,r2)&_ " > ambo Somma <"& Format2(ds3)&"> "& Format2(n3)&"." Scrivi String(65,"-")&" caso n° "&(casi) ruote(1)=r1 : ruote(2)=r2 : co=0 a1=Abs(n1-n3)' Ambata a2=Vert(a1) ' Ambata Secondaria a3=a1-5:If a1<5 Then c1=90+a1:a3=c1-5 a4=a3-5:If a3<5 Then c1=90+a3:a4=c1-5 a5=a4-5:If a4<5 Then c1=90+a4:a5=c1-5 b1=Fuori90(a1+5) b2=Fuori90(b1+5) b3=Fuori90(b2+5) nu1(1)=a1 nu1(2)=a2 co=co+1 ImpostaGiocata co,nu1,ruote,pt,k nu2(1)=a1 nu2(2)=a2 nu2(3)=a3 nu2(4)=a4 nu2(5)=a5 co=co+1 ImpostaGiocata co,nu2,ruote,poste,k nu2(1)=a1 nu2(2)=a2 nu2(3)=b1 nu2(4)=b2 nu2(5)=b3 co=co+1 ImpostaGiocata co,nu2,ruote,poste,k Gioca es End If Next Next Next Next Next ScriviResoconto End Sub Ciao Alla Prossima Gianni
|