capthegamer
Junior Member
Option Explicit
Sub Main
Dim FIn,Ini,A,B,C,D,E,F,G,H,I,L,Salvo50
Dim R1,R2,P8,E1,Ind,Es1,Es2,Es3,Caso,Casi
Dim Som15,xSom1,Som1,Som1F90,SomR2,SomR2F90
FIn = EstrazioneFin
Ini = CInt(InputBox("Inserisci l'estrazione che vuoi iniziare",Salvo50,10780))
Ind = CInt(InputBox(" Quante estrazioni a ritroso per cercare Somma Cinquina? ",Salvo50,50))
' Call ScegliRange(Ini,FIn,Ini,FIn)
Scrivi Space(5) & " Somma Cinquina da Ricercare - Proposto da Capthegamer - Script Salvo50" & Space(5),1,,4,,3,,1
For Es1 = Ini To Fin
Messaggio Es1
AvanzamentoElab Ini,FIn,Es1
Caso = 0
For R1 = 1 To 12
If R1 = 11 Then R1 = 12
A = Estratto(Es1,R1,1)
B = Estratto(Es1,R1,2)
C = Estratto(Es1,R1,3)
D = Estratto(Es1,R1,4)
E = Estratto(Es1,R1,5)
Som15 = Fuori90(A + E)
If pari(Som15) Then
F = 3 * A : G = 6 * B : H = 4 * C : I = 4 * D : L = 5 * E
xSom1 = F + G + H + I + L
Som1 = xSom1/2
Som1F90 = Fuori90(Som1)
Es3 = CInt(Es1 - Ind + 1)
For Es2 = Es1 - 1 To Es3 Step - 1
For R2 = 1 To 12
If R2 = 11 Then R2 = 12
If R2 = R1 Then
SomR2 = SommaEstratti(Es2,R2)
SomR2F90 = Fuori90(SomR2)
If SomR2F90 = Som1F90 Then
Caso = Caso + 1
Casi = Casi + 1
Scrivi String(89,"-") & " Casi Totali " & FormattaStringa(Casi,"0000"),1,,,2
Scrivi String(80,"-") & " Estrazione " &(Es1) & " caso " & FormattaStringa(Caso,"0000"),1,,,1
Scrivi(" Estrazione n." & Format2(Es1) & " del " & DataEstrazione(Es1)),1,0
Scrivi " " & SiglaRuota(R1) & " ",1,0
For P8 = 1 To 5
E1 = Estratto(Es1,R1,P8)
If E1 = A Or E1 = E Then
ColoreTesto 2
Else
ColoreTesto 0
End If
Scrivi Format2(E1) & " ",1,0
ColoreTesto 0
Next
Scrivi " <-- Somma Evidenziati = " & Format2(Som15) & " PARI",1,,,2
Scrivi(" Estrazione n." & Format2(Es2) & " del " & DataEstrazione(Es2)),1,0
Scrivi " " & SiglaRuota(R2) & " " & StringaEstratti(Es2,R2),1,0
Scrivi " Somma Estratti " & SomR2 & " Fuori90 ",1,0
Scrivi SomR2F90,1,0,,2
Scrivi " Numero trovato a ritroso",1
Scrivi
Scrivi " 3 * " & Format2(A) & " = " & Format2(F) & Space(5),1,0
Scrivi " 6 * " & Format2(B) & " = " & Format2(G) & Space(5),1,0
Scrivi " 4 * " & Format2(C) & " = " & Format2(H) & Space(5),1,0
Scrivi " 4 * " & Format2(D) & " = " & Format2(I) & Space(5),1,0
Scrivi " 5 * " & Format2(E) & " = " & Format2(L) & Space(5),1
Scrivi
Scrivi " " & F & " + " & G & " + " & H & " + " & I & " + " & L & " = " & xSom1,1,0
Scrivi " / 2 = " & Som1 & " Fuori90 ",1,0
Scrivi Som1F90,1,0,,2
Scrivi " Numero da cercare a ritroso ",1
End If
End If
Next
Next
End If
If ScriptInterrotto Then Exit Sub
Next
Next
End Sub
Sub Main
Dim FIn,Ini,A,B,C,D,E,F,G,H,I,L,Salvo50
Dim R1,R2,P8,E1,Ind,Es1,Es2,Es3,Caso,Casi
Dim Som15,xSom1,Som1,Som1F90,SomR2,SomR2F90
FIn = EstrazioneFin
Ini = CInt(InputBox("Inserisci l'estrazione che vuoi iniziare",Salvo50,10780))
Ind = CInt(InputBox(" Quante estrazioni a ritroso per cercare Somma Cinquina? ",Salvo50,50))
' Call ScegliRange(Ini,FIn,Ini,FIn)
Scrivi Space(5) & " Somma Cinquina da Ricercare - Proposto da Capthegamer - Script Salvo50" & Space(5),1,,4,,3,,1
For Es1 = Ini To Fin
Messaggio Es1
AvanzamentoElab Ini,FIn,Es1
Caso = 0
For R1 = 1 To 12
If R1 = 11 Then R1 = 12
A = Estratto(Es1,R1,1)
B = Estratto(Es1,R1,2)
C = Estratto(Es1,R1,3)
D = Estratto(Es1,R1,4)
E = Estratto(Es1,R1,5)
Som15 = Fuori90(A + E)
If pari(Som15) Then
F = 3 * A : G = 6 * B : H = 4 * C : I = 4 * D : L = 5 * E
xSom1 = F + G + H + I + L
Som1 = xSom1/2
Som1F90 = Fuori90(Som1)
Es3 = CInt(Es1 - Ind + 1)
For Es2 = Es1 - 1 To Es3 Step - 1
For R2 = 1 To 12
If R2 = 11 Then R2 = 12
If R2 = R1 Then
SomR2 = SommaEstratti(Es2,R2)
SomR2F90 = Fuori90(SomR2)
If SomR2F90 = Som1F90 Then
Caso = Caso + 1
Casi = Casi + 1
Scrivi String(89,"-") & " Casi Totali " & FormattaStringa(Casi,"0000"),1,,,2
Scrivi String(80,"-") & " Estrazione " &(Es1) & " caso " & FormattaStringa(Caso,"0000"),1,,,1
Scrivi(" Estrazione n." & Format2(Es1) & " del " & DataEstrazione(Es1)),1,0
Scrivi " " & SiglaRuota(R1) & " ",1,0
For P8 = 1 To 5
E1 = Estratto(Es1,R1,P8)
If E1 = A Or E1 = E Then
ColoreTesto 2
Else
ColoreTesto 0
End If
Scrivi Format2(E1) & " ",1,0
ColoreTesto 0
Next
Scrivi " <-- Somma Evidenziati = " & Format2(Som15) & " PARI",1,,,2
Scrivi(" Estrazione n." & Format2(Es2) & " del " & DataEstrazione(Es2)),1,0
Scrivi " " & SiglaRuota(R2) & " " & StringaEstratti(Es2,R2),1,0
Scrivi " Somma Estratti " & SomR2 & " Fuori90 ",1,0
Scrivi SomR2F90,1,0,,2
Scrivi " Numero trovato a ritroso",1
Scrivi
Scrivi " 3 * " & Format2(A) & " = " & Format2(F) & Space(5),1,0
Scrivi " 6 * " & Format2(B) & " = " & Format2(G) & Space(5),1,0
Scrivi " 4 * " & Format2(C) & " = " & Format2(H) & Space(5),1,0
Scrivi " 4 * " & Format2(D) & " = " & Format2(I) & Space(5),1,0
Scrivi " 5 * " & Format2(E) & " = " & Format2(L) & Space(5),1
Scrivi
Scrivi " " & F & " + " & G & " + " & H & " + " & I & " + " & L & " = " & xSom1,1,0
Scrivi " / 2 = " & Som1 & " Fuori90 ",1,0
Scrivi Som1F90,1,0,,2
Scrivi " Numero da cercare a ritroso ",1
End If
End If
Next
Next
End If
If ScriptInterrotto Then Exit Sub
Next
Next
End Sub