'Toon Somma 90 su 2 Ruote
Option Explicit
Sub Main
Dim Fin,Ini,P1,P2,n(2),k,x,m,casi,poste(4),poste1(5),ruote(4)
Dim R1,R2,Es,A,B,posta(10),ru(12),n1(3),n2(3),n3(6),Toon
x = InputBox("Quante estrazioni controllo?",Toon,50)
posta(1) = 1
poste1(2) = 1
poste1(3) = 1
poste(2) = 1
k = 13
For Es = EstrazioneFin - x To EstrazioneFin
Messaggio Es
AvanzamentoElab Ini,Fin,Es
For R1 = 1 To 10
If R1 = 11 Then R1 = 12
For P1 = 3 To 3
For R2 = R1 + 1 To 10
If R2 = 11 Then R2 = 12
A = Estratto(Es,R1,P1)
B = Estratto(Es,R2,P1)
If A < 10 Or B < 10 Then
If A + B = 90 Then
ColoreTesto 1:Scrivi String(87,152)
Scrivi DataEstrazione(Es) & " - " & SiglaRuota(R1) & " - " & StringaEstratti(Es,R1) & " - " & SiglaRuota(R1) & " -> " & CInt(A),1
Scrivi DataEstrazione(Es) & " - " & SiglaRuota(R2) & " - " & StringaEstratti(Es,R2) & " - " & SiglaRuota(R2) & " -> " & CInt(B),1
ru(1) = R1
ru(2) = R2
ruote(1) = R1
ruote(2) = 11
n(1) = 45
ImpostaGiocata 1,n,ru,posta,k
n1(1) = 45
n1(2) = DiametraleD(A)
n1(3) = Fuori90(Diametrale(A))
ImpostaGiocata 2,n1,ruote,poste,k
n2(1) = 45
n2(2) = DiametraleD(B)
n2(3) = Fuori90(Diametrale(B))
ImpostaGiocata 3,n2,ruote,poste,k
Gioca Es,1
End If
End If
Next: Next: Next: Next
If ScriptInterrotto Then Exit Sub
ScriviResoconto
'Toon Somma 90 su 2 Ruote
End Sub