| Ottimo Metodo 899
Ecco il listato in L8
Sub main() Dim nu1(10),nu2(10) Dim ruote(10),ruota(10) Dim posta(5),poste(5) poste(1)=1:posta(2)=2 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 11:If r2=11 Then r2=12 For p3=1 To 5 n3=Estratto(es,r2,p3) a1=Distanza(n1,n3) If a1=45 And p1=p3 And n1<n3 Then casi=casi+1:Scrivi String(75,"="),1 Scrivi DataEstrazione(es,1)&" < "&siglaRuota(r1)& " "& StringaEstratti(es,r1)&_ " > Primo Numero < "&Format2 (n1)&" ." Scrivi DataEstrazione(es,1)&" < "&siglARuota(r2)& " "& StringaEstratti(es,r2)&_ " > Secondo Num. < "&Format2 (n3)&" Distanza "&Format2(a1)&" Posizione "&Format2(p1)&"<" Scrivi String(65,"-")&" caso n° "&(casi) b1=Fuori90(n1+n3) b2=Fuori90(b1+b1) b3=90-b2 b4=Fuori90(b3+30) b5=Fuori90(b4+60) ruote(1)=r1:ruote(2)=r2:k=14:co=0:ruota(5)=11 If b4>b5 And Abs(b4-b5)=60 Then b6=Fuori90(b4-30) If b4>b5 And Abs(b4-b5)=30 Then b6=Fuori90(b4+30) If b5>b4 And Abs(b5-b4)=60 Then b6=Fuori90(b5-30) If b5>b4 And Abs(b5-b4)=30 Then b6=Fuori90(b5+30) k1=90-b4:k2=90-b6 nu2(1)=b5 co=co+1 ImpostaGiocata co,nu2,ruote,poste,k nu1(1)=b5 nu1(2)=b4 nu1(3)=k1 co=co+1 ImpostaGiocata co,nu1,ruote,posta,k co=co+1 ImpostaGiocata co,nu1,ruota,posta,k nu1(1)=b5 nu1(2)=b6 nu1(3)=k2 co=co+1 ImpostaGiocata co,nu1,ruote,posta,k co=co+1 ImpostaGiocata co,nu1,ruota,posta,k Gioca es End If Next:Next:Next Next:Next ScriviResoconto End Sub
|