Novità

non so come risolvere questo script in quadratura su tabella

Zetrix

Advanced Premium Member
9088.PNG

Ciao.
dovrei risolvere questa tabella ma non so perche da dei risultati sbagliati
79+54=0 ??
8+1=9
qualcuno sa come risolvere questa tabella
forse e impostato male lo script
 
Ultima modifica:
Codice:
Option Explicit
Sub Main
   Dim T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13
   Dim A,B,C,D,X,Y,K
   Dim ambata1(2),ambata2(2),ambata3(2),calc(10),ruota(5),ruote(5),posta(1),poste(2)
   Dim ambo1(2),ambo2(2),ambo3(2),ambo4(2),ambo5(2),ambo6(2),ambo7(2),ambo8(2),ambo9(2)
   Dim RS,RV,RX,RK,ES
   Dim R1,R2,P1,P2
   Dim S1,S2,S3,S4,S5,S6,S7,S8,S9,S10,S11,S12,S13,S14
   posta(1) = 1
   poste(2) = 1
   '
   RS = InputBox("Quante estrazioni vuoi controllare?",,0)
   K = 9
   For ES = EstrazioneFin - RS To EstrazioneFin
      AvanzamentoElab EstrazioneFin - RS,EstrazioneFin,ES
      For R1 = 1 To 9
         R2 = R1 + 2
         If R2 = 11 Then R2 = 12
         For P1 = 1 To 3
            P2 = P1 + 2
            '
            A = Estratto(ES,R1,P1)
            B = Estratto(ES,R1,P2)
            C = Estratto(ES,R2,P1)
            D = Estratto(ES,R2,P2)
            '
            'If Fuori90(A + B) = Fuori90(C + D) Then
            '
            '
            ReDim MatriceCaselleDaEvid(4,1)
            '
            MatriceCaselleDaEvid(1,0) = R1
            MatriceCaselleDaEvid(1,1) = P1
            '
            MatriceCaselleDaEvid(2,0) = R1
            MatriceCaselleDaEvid(2,1) = P2
            '
            MatriceCaselleDaEvid(3,0) = R2
            MatriceCaselleDaEvid(3,1) = P1
            '
            MatriceCaselleDaEvid(4,0) = R2
            MatriceCaselleDaEvid(4,1) = P2
            '
            ReDim MatriceLegami(4,3)
            '
            MatriceLegami(1,0) = R1
            MatriceLegami(1,1) = P1
            MatriceLegami(1,2) = R1
            MatriceLegami(1,3) = P2
            '
            If R2 = 12 Then MatriceLegami(2,0) = R2 - 1 Else MatriceLegami(2,0) = R2
            MatriceLegami(2,1) = P1
            If R2 = 12 Then MatriceLegami(2,2) = R2 - 1 Else MatriceLegami(2,2) = R2
            MatriceLegami(2,3) = P2
            '
            MatriceLegami(3,0) = R1
            MatriceLegami(3,1) = P1
            If R2 = 12 Then MatriceLegami(3,2) = R2 - 1 Else MatriceLegami(3,2) = R2
            MatriceLegami(3,3) = P1
            '
            MatriceLegami(4,0) = R1
            MatriceLegami(4,1) = P2
            If R2 = 12 Then MatriceLegami(4,2) = R2 - 1 Else MatriceLegami(4,2) = R2
            MatriceLegami(4,3) = P2
            '
            '
            Call DisegnaEstrazione(ES,MatriceCaselleDaEvid,MatriceLegami)
            '
            '
            T1 = Array(T1,"So1","So2","Diff","  ","So3","So4","Diff","1Ambo",A,B)
            Call InitTabella(T1)
            Call SetColoreCella(1,RGB(255,255,255),RGB(0,0,0))
            Call SetColoreCella(2,RGB(255,255,255),RGB(0,0,0))
            Call SetColoreCella(3,RGB(255,255,255),RGB(0,0,0))
            Call SetColoreCella(4,RGB(255,255,255),RGB(0,0,0))
            Call SetColoreCella(5,RGB(255,255,255),RGB(0,0,0))
            Call SetColoreCella(6,RGB(255,255,255),RGB(0,0,0))
            Call SetColoreCella(7,RGB(255,255,255),RGB(0,0,0))
            Call SetColoreCella(8,RGB(255,255,255),RGB(0,0,0))
            Call SetColoreCella(9,RGB(255,255,255),RGB(0,0,0))
            '-------------------------------
            '
            '------------------------------------------------
            T2 = Array(T2,"  ","  ","  ","  ","  ","  ","  ","2Ambo",C,D)
            Call AddRigaTabella(T2)
            Call SetColoreCella(1,RGB(255,255,255),RGB(0,0,0))
            Call SetColoreCella(2,RGB(255,255,255),RGB(0,0,0))
            Call SetColoreCella(3,RGB(255,255,255),RGB(0,0,0))
            Call SetColoreCella(4,RGB(255,255,255),RGB(0,0,0))
            Call SetColoreCella(5,RGB(255,255,255),RGB(0,0,0))
            Call SetColoreCella(6,RGB(255,255,255),RGB(0,0,0))
            Call SetColoreCella(7,RGB(255,255,255),RGB(0,0,0))
            Call SetColoreCella(8,RGB(255,255,255),RGB(0,0,0))
            Call SetColoreCella(9,RGB(255,255,255),RGB(0,0,0))
            '-------------------------------
            S1 = Fuori90(A + C)
            S2 = Fuori90(B + D)
            S3 = Differenza(S1,S2)
            '-------------------------------
            '-------------------------------
            If S1 > S2 Then S1 = S1 & "-" Else S2 = S2 & "-"
            If S2 < S1 Then S2 = S2 & "+" Else S1 = S1 & "+"
            '-------------------------------
            A = A & "+" : B = B & "+"
            '-------------------------------
            '-----------------------------------------------
            T3 = Array(T3,A,B,"  ","  ",S1,S2," ","  ","  ","  ")
            Call AddRigaTabella(T3)
            Call SetColoreCella(1,RGB(255,255,255),RGB(0,0,0))
            Call SetColoreCella(2,RGB(255,255,255),RGB(0,0,0))
            Call SetColoreCella(3,RGB(255,255,255),RGB(0,0,0))
            Call SetColoreCella(4,RGB(255,255,255),RGB(0,0,0))
            Call SetColoreCella(5,RGB(255,255,255),RGB(0,0,0))
            Call SetColoreCella(6,RGB(255,255,255),RGB(0,0,0))
            Call SetColoreCella(7,RGB(255,255,255),RGB(0,0,0))
            Call SetColoreCella(8,RGB(255,255,255),RGB(0,0,0))
            Call SetColoreCella(9,RGB(255,255,255),RGB(0,0,0))
            '-------------------------------
            S1 = Fuori90(A + C)
            S2 = Fuori90(B + D)
            S3 = Differenza(S1,S2)
            S4 = S3/2
            If pari(S3) Then
               '
               '-------------------------------
               T4 = Array(T4,C,D,"  ","  ",S4,S4," ","  ","  ","  ")
               Call AddRigaTabella(T4)
               Call SetColoreCella(1,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(2,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(3,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(4,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(5,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(6,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(7,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(8,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(9,RGB(255,255,255),RGB(0,0,0))
               '-------------------------------
               '
               '-------------------------------
               T5 = Array(T5,"  ","  ","  ","  ","  ","  ","  ","  ","  ","  ")
               Call AddRigaTabella(T5)
               Call SetColoreCella(1,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(2,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(3,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(4,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(5,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(6,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(7,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(8,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(9,RGB(255,255,255),RGB(0,0,0))
               '-------------------------------
               S1 = Fuori90(A + C)
               S2 = Fuori90(B + D)
               S3 = Differenza(S1,S2)
               S4 = S3/2
               If S1 > S2 Then
                  S5 = Fuori90(S1 - S4)
               Else
                  S5 = Fuori90(S1 + S4)
               End If
               If S2 < S1 Then
                  S6 = Fuori90(S2 + S4)
               Else
                  S6 = Fuori90(S2 - S4)
               End If
               '
               S7 = 0
               '
               '-------------------------------
               T6 = Array(T6,Format2(S1),Format2(S2),Format2(S3),"  ",S5,S6,S7,"Figura",Figura(A),Figura(B))
               Call AddRigaTabella(T6)
               Call SetColoreCella(1,RGB(26,217,136),RGB(0,0,0))
               Call SetColoreCella(2,RGB(26,217,136),RGB(0,0,0))
               Call SetColoreCella(3,RGB(255,187,9),RGB(0,0,0))
               Call SetColoreCella(4,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(5,RGB(223,249,3),RGB(0,0,0))
               Call SetColoreCella(6,RGB(223,249,3),RGB(0,0,0))
               Call SetColoreCella(7,RGB(223,249,3),RGB(0,0,0))
               Call SetColoreCella(8,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(9,RGB(255,255,255),RGB(0,0,0))
               '-------------------------------
               '
               '-------------------------------
               T7 = Array(T7,"  ","  ","  ","  ","  ","  ","  ","Figura",Figura(C),Figura(D))
               Call AddRigaTabella(T7)
               Call SetColoreCella(1,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(2,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(3,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(4,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(5,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(6,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(7,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(8,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(9,RGB(255,255,255),RGB(0,0,0))
               '-------------------------------
               '
               S8 = Fuori90(A + B)
               S9 = Fuori90(C + D)
               '
               If S8 > S9 Then S8 = S8 & "-" Else S9 = S9 & "-"
               If S9 < S8 Then S9 = S9 & "+" Else S8 = S8 & "+"
               '
               '-------------------------------
               T8 = Array(T8,"  ","  ","  ","  ",S8,S9,"  ","  ","  ","  ")
               Call AddRigaTabella(T8)
               Call SetColoreCella(1,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(2,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(3,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(4,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(5,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(6,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(7,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(8,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(9,RGB(255,255,255),RGB(0,0,0))
               '-------------------------------
               S8 = Fuori90(A + B)
               S9 = Fuori90(C + D)
               S10 = Differenza(S8,S9)
               S11 = S10/2
               '
               '-------------------------------
               T9 = Array(T9,A,B,S8,"  ",S11,S11,"  ","  ","  ","  ")
               Call AddRigaTabella(T9)
               Call SetColoreCella(1,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(2,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(3,RGB(26,217,136),RGB(0,0,0))
               Call SetColoreCella(4,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(5,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(6,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(7,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(8,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(9,RGB(255,255,255),RGB(0,0,0))
               '-------------------------------
               S8 = Fuori90(A + B)
               S9 = Fuori90(C + D)
               S10 = Differenza(S8,S9)
               S11 = S10/2
               '-------------------------------
               T10 = Array(T10,C,D,S9,"  ","  ","  ","  ","  ","  ","  ")
               Call AddRigaTabella(T10)
               Call SetColoreCella(1,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(2,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(3,RGB(26,217,136),RGB(0,0,0))
               Call SetColoreCella(4,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(5,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(6,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(7,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(8,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(9,RGB(255,255,255),RGB(0,0,0))
               '-------------------------------
               S8 = Fuori90(A + B)
               S9 = Fuori90(C + D)
               S10 = Differenza(S8,S9)
               S11 = S10/2
               '
               If S8 > S9 Then
                  S12 = Fuori90(S8 - S11)
               Else
                  S12 = Fuori90(S8 + S11)
               End If
               If S9 < S8 Then
                  S13 = Fuori90(S9 + S11)
               Else
                  S13 = Fuori90(S9 - S11)
               End If
               '
               '-------------------------------
               T11 = Array(T11,"  ","  ",S10,"  ",S12,S13,S7,"  ","  ","  ")
               Call AddRigaTabella(T11)
               Call SetColoreCella(1,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(2,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(3,RGB(255,187,9),RGB(0,0,0))
               Call SetColoreCella(4,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(5,RGB(223,249,3),RGB(0,0,0))
               Call SetColoreCella(6,RGB(223,249,3),RGB(0,0,0))
               Call SetColoreCella(7,RGB(223,249,3),RGB(0,0,0))
               Call SetColoreCella(8,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(9,RGB(255,255,255),RGB(0,0,0))
               '-------------------------------
               '-------------------------------
               T12 = Array(T12,"  ","  ","  ","  ","  ","  ","  ","  ","  ","  ")
               Call AddRigaTabella(T12)
               Call SetColoreCella(1,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(2,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(3,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(4,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(5,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(6,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(7,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(8,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(9,RGB(255,255,255),RGB(0,0,0))
               '-------------------------------
               '
               '-------------------------------
               T13 = Array(T13,"  ","  ","  ","  ","  ","  ","  ","  ","  ","  ")
               Call AddRigaTabella(T13)
               Call SetColoreCella(1,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(2,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(3,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(4,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(5,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(6,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(7,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(8,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(9,RGB(255,255,255),RGB(0,0,0))
               '-------------------------------
               '-------------------------------
               Call SetTableWidth("21%")
               CreaTabella
               '------------------------------
               ruota(1) = R1
               ruota(2) = R2
               '-----------------------------
               ruote(1) = R1
               ruote(2) = R2
               ruote(3) = 11
               ruote(4) = 12
               '----------------------------
               ambata1(1) = Fuori90(S5)
               '
               ambo1(1) = ambata1(1)
               ambo1(2) = S1
               '----------------
               ambo2(1) = ambata1(1)
               ambo2(2) = S2
               '----------------
               '----------------
               '----------------
               ImpostaGiocata 1,ambata1,ruota,posta,K
               Gioca ES,1,,1
               Scrivi
               ImpostaGiocata 1,ambo1,ruote,poste,K
               ImpostaGiocata 2,ambo2,ruote,poste,K
               Gioca ES,1,,1
               Scrivi
            End If
            'End If
         Next
      Next
   Next
End Sub
 
9092.png

9093.PNG

Numeri in gioco 73 su PA TO per Estratto
Numeri in gioco 28 su PA TO per Estratto
[TO] [.. .. .. .. 28] C. 4 Estratto 02389 [06/09/2024] [17.88.13.58.28]

............................
Numeri in gioco 73.65 su PA TO TT NZ per Ambo
Numeri in gioco 73.81 su PA TO TT NZ per Ambo
Numeri in gioco 28.13 su PA TO TT NZ per Ambo
Numeri in gioco 28.43 su PA TO TT NZ per Ambo
[TO] [.. .. 13 .. 28] C. 4 Ambo 02389 [06/09/2024] [17.88.13.58.28]


ho risolto lo script
 
Codice:
Sub Main
   Dim T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13
   Dim A,B,C,D,X,Y,K
   Dim ambata1(2),ambata2(2),ambata3(2),calc(10),ruota(5),ruote(5),posta(1),poste(2)
   Dim ambo1(2),ambo2(2),ambo3(2),ambo4(2),ambo5(2),ambo6(2),ambo7(2),ambo8(2),ambo9(2)
   Dim RS,RV,RX,RK,ES
   Dim R1,R2,P1,P2
   Dim S1,S2,S3,S4,S5,S6,S7,S8,S9,S10,S11,S12,S13,S14,S15,S16
   Dim N8,N9
   posta(1) = 1
   poste(2) = 1
   '
   RS = InputBox("Quante estrazioni vuoi controllare?",,0)
   K = 9
   For ES = EstrazioneFin - RS To EstrazioneFin
      AvanzamentoElab EstrazioneFin - RS,EstrazioneFin,ES
      For R1 = 1 To 9
         R2 = R1 + 2
         If R2 = 11 Then R2 = 12
         For P1 = 1 To 3
            P2 = P1 + 2
            '
            A = Estratto(ES,R1,P1)
            B = Estratto(ES,R1,P2)
            C = Estratto(ES,R2,P1)
            D = Estratto(ES,R2,P2)
            '
            N8 = Fuori90(A + B)
            N9 = Fuori90(C + D)
            '
            '
            ReDim MatriceCaselleDaEvid(4,1)
            '
            MatriceCaselleDaEvid(1,0) = R1
            MatriceCaselleDaEvid(1,1) = P1
            '
            MatriceCaselleDaEvid(2,0) = R1
            MatriceCaselleDaEvid(2,1) = P2
            '
            MatriceCaselleDaEvid(3,0) = R2
            MatriceCaselleDaEvid(3,1) = P1
            '
            MatriceCaselleDaEvid(4,0) = R2
            MatriceCaselleDaEvid(4,1) = P2
            '
            ReDim MatriceLegami(4,3)
            '
            MatriceLegami(1,0) = R1
            MatriceLegami(1,1) = P1
            MatriceLegami(1,2) = R1
            MatriceLegami(1,3) = P2
            '
            If R2 = 12 Then MatriceLegami(2,0) = R2 - 1 Else MatriceLegami(2,0) = R2
            MatriceLegami(2,1) = P1
            If R2 = 12 Then MatriceLegami(2,2) = R2 - 1 Else MatriceLegami(2,2) = R2
            MatriceLegami(2,3) = P2
            '
            MatriceLegami(3,0) = R1
            MatriceLegami(3,1) = P1
            If R2 = 12 Then MatriceLegami(3,2) = R2 - 1 Else MatriceLegami(3,2) = R2
            MatriceLegami(3,3) = P1
            '
            MatriceLegami(4,0) = R1
            MatriceLegami(4,1) = P2
            If R2 = 12 Then MatriceLegami(4,2) = R2 - 1 Else MatriceLegami(4,2) = R2
            MatriceLegami(4,3) = P2
            '
            '
            Call DisegnaEstrazione(ES,MatriceCaselleDaEvid,MatriceLegami)
            '
            '
            T1 = Array(T1,"So1","So2","Diff","  ","So3","So4","Diff","1Ambo",A,B)
            Call InitTabella(T1)
            Call SetColoreCella(1,RGB(255,255,255),RGB(0,0,0))
            Call SetColoreCella(2,RGB(255,255,255),RGB(0,0,0))
            Call SetColoreCella(3,RGB(255,255,255),RGB(0,0,0))
            Call SetColoreCella(4,RGB(255,255,255),RGB(0,0,0))
            Call SetColoreCella(5,RGB(255,255,255),RGB(0,0,0))
            Call SetColoreCella(6,RGB(255,255,255),RGB(0,0,0))
            Call SetColoreCella(7,RGB(255,255,255),RGB(0,0,0))
            Call SetColoreCella(8,RGB(255,255,255),RGB(0,0,0))
            Call SetColoreCella(9,RGB(255,255,255),RGB(0,0,0))
            '-------------------------------
            '
            '------------------------------------------------
            T2 = Array(T2,"  ","  ","  ","  ","  ","  ","  ","2Ambo",C,D)
            Call AddRigaTabella(T2)
            Call SetColoreCella(1,RGB(255,255,255),RGB(0,0,0))
            Call SetColoreCella(2,RGB(255,255,255),RGB(0,0,0))
            Call SetColoreCella(3,RGB(255,255,255),RGB(0,0,0))
            Call SetColoreCella(4,RGB(255,255,255),RGB(0,0,0))
            Call SetColoreCella(5,RGB(255,255,255),RGB(0,0,0))
            Call SetColoreCella(6,RGB(255,255,255),RGB(0,0,0))
            Call SetColoreCella(7,RGB(255,255,255),RGB(0,0,0))
            Call SetColoreCella(8,RGB(255,255,255),RGB(0,0,0))
            Call SetColoreCella(9,RGB(255,255,255),RGB(0,0,0))
            '-------------------------------
            S1 = Fuori90(A + C)
            S2 = Fuori90(B + D)
            S3 = Differenza(S1,S2)
            '
            S8 = Fuori90(A + B)
            S9 = Fuori90(C + D)
            S10 = Differenza(S8,S9)
            S11 = S10/2
            '-------------------------------
            If S8 > S9 Then : S12 = Fuori90(S8 - S11) Else S12 = Fuori90(S8 + S11)
            If S9 < S8 Then : S13 = Fuori90(S9 + S11) Else S13 = Fuori90(S9 - S11)
            '
            '-------------------------------
            If S1 > S2 Then S1 = S1 & "-" Else S2 = S2 & "-"
            If S2 < S1 Then S2 = S2 & "+" Else S1 = S1 & "+"
            '-------------------------------
            If S8 > S9 Then S8 = S8 & "-" Else S9 = S9 & "-"
            If S9 < S8 Then S9 = S9 & "+" Else S8 = S8 & "+"
            '
            '
            A = A & "+" : B = B & "+"
            '-------------------------------
            '-----------------------------------------------
            T3 = Array(T3,A,B,"  ","  ",S1,S2," ","  ","  ","  ")
            Call AddRigaTabella(T3)
            Call SetColoreCella(1,RGB(255,255,255),RGB(0,0,0))
            Call SetColoreCella(2,RGB(255,255,255),RGB(0,0,0))
            Call SetColoreCella(3,RGB(255,255,255),RGB(0,0,0))
            Call SetColoreCella(4,RGB(255,255,255),RGB(0,0,0))
            Call SetColoreCella(5,RGB(255,255,255),RGB(0,0,0))
            Call SetColoreCella(6,RGB(255,255,255),RGB(0,0,0))
            Call SetColoreCella(7,RGB(255,255,255),RGB(0,0,0))
            Call SetColoreCella(8,RGB(255,255,255),RGB(0,0,0))
            Call SetColoreCella(9,RGB(255,255,255),RGB(0,0,0))
            '-------------------------------
            S1 = Fuori90(A + C)
            S2 = Fuori90(B + D)
            S3 = Differenza(S1,S2)
            S4 = S3/2
            If pari(S3) Then
               '
               '-------------------------------
               T4 = Array(T4,C,D,"  ","  ",S4,S4," ","  ","  ","  ")
               Call AddRigaTabella(T4)
               Call SetColoreCella(1,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(2,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(3,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(4,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(5,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(6,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(7,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(8,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(9,RGB(255,255,255),RGB(0,0,0))
               '-------------------------------
               '
               '-------------------------------
               T5 = Array(T5,"  ","  ","  ","  ","  ","  ","  ","  ","  ","  ")
               Call AddRigaTabella(T5)
               Call SetColoreCella(1,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(2,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(3,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(4,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(5,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(6,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(7,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(8,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(9,RGB(255,255,255),RGB(0,0,0))
               '-------------------------------
               If S1 > S2 Then : S5 = Fuori90(S1 - S4) Else S5 = Fuori90(S1 + S4)
               If S2 < S1 Then : S6 = Fuori90(S2 + S4) Else S6 = Fuori90(S2 - S4)
               '
               S7 = 0
               '
               '-------------------------------
               T6 = Array(T6,Format2(S1),Format2(S2),Format2(S3),"  ",S5,S6,S7,"Figura",Figura(A),Figura(B))
               Call AddRigaTabella(T6)
               Call SetColoreCella(1,RGB(26,217,136),RGB(0,0,0))
               Call SetColoreCella(2,RGB(26,217,136),RGB(0,0,0))
               Call SetColoreCella(3,RGB(255,187,9),RGB(0,0,0))
               Call SetColoreCella(4,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(5,RGB(223,249,3),RGB(0,0,0))
               Call SetColoreCella(6,RGB(223,249,3),RGB(0,0,0))
               Call SetColoreCella(7,RGB(223,249,3),RGB(0,0,0))
               Call SetColoreCella(8,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(9,RGB(255,255,255),RGB(0,0,0))
               '-------------------------------
               '
               '-------------------------------
               T7 = Array(T7,"  ","  ","  ","  ","  ","  ","  ","Figura",Figura(C),Figura(D))
               Call AddRigaTabella(T7)
               Call SetColoreCella(1,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(2,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(3,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(4,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(5,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(6,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(7,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(8,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(9,RGB(255,255,255),RGB(0,0,0))
               '-------------------------------
               '-------------------------------
               T8 = Array(T8,"  ","  ","  ","  ",S8,S9,"  ","  ","  ","  ")
               Call AddRigaTabella(T8)
               Call SetColoreCella(1,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(2,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(3,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(4,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(5,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(6,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(7,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(8,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(9,RGB(255,255,255),RGB(0,0,0))
               '-------------------------------
               '
               '-------------------------------
               T9 = Array(T9,A,B,N8,"  ",S11,S11,"  ","  ","  ","  ")
               Call AddRigaTabella(T9)
               Call SetColoreCella(1,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(2,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(3,RGB(26,217,136),RGB(0,0,0))
               Call SetColoreCella(4,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(5,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(6,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(7,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(8,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(9,RGB(255,255,255),RGB(0,0,0))
               '-------------------------------
               '-------------------------------
               T10 = Array(T10,C,D,N9,"  ","  ","  ","  ","  ","  ","  ")
               Call AddRigaTabella(T10)
               Call SetColoreCella(1,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(2,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(3,RGB(26,217,136),RGB(0,0,0))
               Call SetColoreCella(4,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(5,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(6,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(7,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(8,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(9,RGB(255,255,255),RGB(0,0,0))
               '-------------------------------
               '-------------------------------
               T11 = Array(T11,"  ","  ",S10,"  ",S12,S13,S7,"  ","  ","  ")
               Call AddRigaTabella(T11)
               Call SetColoreCella(1,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(2,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(3,RGB(255,187,9),RGB(0,0,0))
               Call SetColoreCella(4,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(5,RGB(223,249,3),RGB(0,0,0))
               Call SetColoreCella(6,RGB(223,249,3),RGB(0,0,0))
               Call SetColoreCella(7,RGB(223,249,3),RGB(0,0,0))
               Call SetColoreCella(8,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(9,RGB(255,255,255),RGB(0,0,0))
               '-------------------------------
               '-------------------------------
               T12 = Array(T12,"  ","  ","  ","  ","  ","  ","  ","  ","  ","  ")
               Call AddRigaTabella(T12)
               Call SetColoreCella(1,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(2,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(3,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(4,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(5,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(6,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(7,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(8,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(9,RGB(255,255,255),RGB(0,0,0))
               '-------------------------------
               '
               '-------------------------------
               T13 = Array(T13,"  ","  ","  ","  ","  ","  ","  ","  ","  ","  ")
               Call AddRigaTabella(T13)
               Call SetColoreCella(1,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(2,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(3,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(4,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(5,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(6,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(7,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(8,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(9,RGB(255,255,255),RGB(0,0,0))
               '-------------------------------
               '-------------------------------
               Call SetTableWidth("21%")
               CreaTabella
               '------------------------------
               ruota(1) = R1
               ruota(2) = R2
               '-----------------------------
               ruote(1) = R1
               ruote(2) = R2
               ruote(3) = 11
               ruote(4) = 12
               '----------------------------
               ambata1(1) = Fuori90(S5)
               ambata2(1) = Fuori90(S12)
               '
               ambo1(1) = ambata1(1)
               ambo1(2) = S1
               '----------------
               ambo2(1) = ambata1(1)
               ambo2(2) = S2
               '----------------
               '----------------
               ambo3(1) = ambata2(1)
               ambo3(2) = N8
               '----------------
               ambo4(1) = ambata2(1)
               ambo4(2) = N9
               '----------------
               '----------------
               ImpostaGiocata 1,ambata1,ruota,posta,K
               ImpostaGiocata 2,ambata2,ruota,posta,K
               Gioca ES,1,,1
               Scrivi
               Scrivi"............................"
               Scrivi
               ImpostaGiocata 1,ambo1,ruote,poste,K
               ImpostaGiocata 2,ambo2,ruote,poste,K
               ImpostaGiocata 3,ambo3,ruote,poste,K
               ImpostaGiocata 4,ambo4,ruote,poste,K
               Gioca ES,1,,1
               Scrivi
            End If
         Next
      Next
   Next
End Sub

quadrati 3x3

questo e lo script corretto ci ho messo diverse ore per sistemare lo script
in teoria lo script era scritto bene ma era impostato male
 
Ultima modifica:
considerate che su quello script ci sto lavorando e dobbiamo vedere quale e la condizione
migliore e come impostare meglio lo script ma ci sono alcune cose che non vi ho detto
le quadrature si dispongono in quattro modi
2x2
3x3
4x4
5x5
adesso vi metto lo script con le quadrature 2x2 ..poi la quadratura 4x4...e infine la quadratura 5x5
considerate che ho scritto piu di 5 mila script
l'altro script che vi ho messo e sulla quadratura 3x3
 
Ultima modifica:
Codice:
Sub Main
   Dim T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13
   Dim A,B,C,D,X,Y,K
   Dim ambata1(2),ambata2(2),ambata3(2),calc(10),ruota(5),ruote(5),posta(1),poste(2)
   Dim ambo1(2),ambo2(2),ambo3(2),ambo4(2),ambo5(2),ambo6(2),ambo7(2),ambo8(2),ambo9(2)
   Dim RS,RV,RX,RK,ES
   Dim R1,R2,P1,P2
   Dim S1,S2,S3,S4,S5,S6,S7,S8,S9,S10,S11,S12,S13,S14,S15,S16
   Dim N8,N9
   posta(1) = 1
   poste(2) = 1
   '
   RS = InputBox("Quante estrazioni vuoi controllare?",,0)
   K = 9
   For ES = EstrazioneFin - RS To EstrazioneFin
      AvanzamentoElab EstrazioneFin - RS,EstrazioneFin,ES
      For R1 = 1 To 10
         R2 = R1 + 1
         If R2 = 11 Then R2 = 12
         For P1 = 1 To 4
            P2 = P1 + 1
            '
            A = Estratto(ES,R1,P1)
            B = Estratto(ES,R1,P2)
            C = Estratto(ES,R2,P1)
            D = Estratto(ES,R2,P2)
            '
            N8 = Fuori90(A + B)
            N9 = Fuori90(C + D)
            '
            '
            ReDim MatriceCaselleDaEvid(4,1)
            '
            MatriceCaselleDaEvid(1,0) = R1
            MatriceCaselleDaEvid(1,1) = P1
            '
            MatriceCaselleDaEvid(2,0) = R1
            MatriceCaselleDaEvid(2,1) = P2
            '
            MatriceCaselleDaEvid(3,0) = R2
            MatriceCaselleDaEvid(3,1) = P1
            '
            MatriceCaselleDaEvid(4,0) = R2
            MatriceCaselleDaEvid(4,1) = P2
            '
            ReDim MatriceLegami(4,3)
            '
            MatriceLegami(1,0) = R1
            MatriceLegami(1,1) = P1
            MatriceLegami(1,2) = R1
            MatriceLegami(1,3) = P2
            '
            If R2 = 12 Then MatriceLegami(2,0) = R2 - 1 Else MatriceLegami(2,0) = R2
            MatriceLegami(2,1) = P1
            If R2 = 12 Then MatriceLegami(2,2) = R2 - 1 Else MatriceLegami(2,2) = R2
            MatriceLegami(2,3) = P2
            '
            MatriceLegami(3,0) = R1
            MatriceLegami(3,1) = P1
            If R2 = 12 Then MatriceLegami(3,2) = R2 - 1 Else MatriceLegami(3,2) = R2
            MatriceLegami(3,3) = P1
            '
            MatriceLegami(4,0) = R1
            MatriceLegami(4,1) = P2
            If R2 = 12 Then MatriceLegami(4,2) = R2 - 1 Else MatriceLegami(4,2) = R2
            MatriceLegami(4,3) = P2
            '
            '
            Call DisegnaEstrazione(ES,MatriceCaselleDaEvid,MatriceLegami)
            '
            '
            T1 = Array(T1,"So1","So2","Diff","  ","So3","So4","Diff","1Ambo",A,B)
            Call InitTabella(T1)
            Call SetColoreCella(1,RGB(255,255,255),RGB(0,0,0))
            Call SetColoreCella(2,RGB(255,255,255),RGB(0,0,0))
            Call SetColoreCella(3,RGB(255,255,255),RGB(0,0,0))
            Call SetColoreCella(4,RGB(255,255,255),RGB(0,0,0))
            Call SetColoreCella(5,RGB(255,255,255),RGB(0,0,0))
            Call SetColoreCella(6,RGB(255,255,255),RGB(0,0,0))
            Call SetColoreCella(7,RGB(255,255,255),RGB(0,0,0))
            Call SetColoreCella(8,RGB(255,255,255),RGB(0,0,0))
            Call SetColoreCella(9,RGB(255,255,255),RGB(0,0,0))
            '-------------------------------
            '
            '------------------------------------------------
            T2 = Array(T2,"  ","  ","  ","  ","  ","  ","  ","2Ambo",C,D)
            Call AddRigaTabella(T2)
            Call SetColoreCella(1,RGB(255,255,255),RGB(0,0,0))
            Call SetColoreCella(2,RGB(255,255,255),RGB(0,0,0))
            Call SetColoreCella(3,RGB(255,255,255),RGB(0,0,0))
            Call SetColoreCella(4,RGB(255,255,255),RGB(0,0,0))
            Call SetColoreCella(5,RGB(255,255,255),RGB(0,0,0))
            Call SetColoreCella(6,RGB(255,255,255),RGB(0,0,0))
            Call SetColoreCella(7,RGB(255,255,255),RGB(0,0,0))
            Call SetColoreCella(8,RGB(255,255,255),RGB(0,0,0))
            Call SetColoreCella(9,RGB(255,255,255),RGB(0,0,0))
            '-------------------------------
            S1 = Fuori90(A + C)
            S2 = Fuori90(B + D)
            S3 = Differenza(S1,S2)
            '
            S8 = Fuori90(A + B)
            S9 = Fuori90(C + D)
            S10 = Differenza(S8,S9)
            S11 = S10/2
            '-------------------------------
            If S8 > S9 Then : S12 = Fuori90(S8 - S11) Else S12 = Fuori90(S8 + S11)
            If S9 < S8 Then : S13 = Fuori90(S9 + S11) Else S13 = Fuori90(S9 - S11)
            '
            '-------------------------------
            If S1 > S2 Then S1 = S1 & "-" Else S2 = S2 & "-"
            If S2 < S1 Then S2 = S2 & "+" Else S1 = S1 & "+"
            '-------------------------------
            If S8 > S9 Then S8 = S8 & "-" Else S9 = S9 & "-"
            If S9 < S8 Then S9 = S9 & "+" Else S8 = S8 & "+"
            '
            '
            A = A & "+" : B = B & "+"
            '-------------------------------
            '-----------------------------------------------
            T3 = Array(T3,A,B,"  ","  ",S1,S2," ","  ","  ","  ")
            Call AddRigaTabella(T3)
            Call SetColoreCella(1,RGB(255,255,255),RGB(0,0,0))
            Call SetColoreCella(2,RGB(255,255,255),RGB(0,0,0))
            Call SetColoreCella(3,RGB(255,255,255),RGB(0,0,0))
            Call SetColoreCella(4,RGB(255,255,255),RGB(0,0,0))
            Call SetColoreCella(5,RGB(255,255,255),RGB(0,0,0))
            Call SetColoreCella(6,RGB(255,255,255),RGB(0,0,0))
            Call SetColoreCella(7,RGB(255,255,255),RGB(0,0,0))
            Call SetColoreCella(8,RGB(255,255,255),RGB(0,0,0))
            Call SetColoreCella(9,RGB(255,255,255),RGB(0,0,0))
            '-------------------------------
            S1 = Fuori90(A + C)
            S2 = Fuori90(B + D)
            S3 = Differenza(S1,S2)
            S4 = S3/2
            If pari(S3) Then
               '
               '-------------------------------
               T4 = Array(T4,C,D,"  ","  ",S4,S4," ","  ","  ","  ")
               Call AddRigaTabella(T4)
               Call SetColoreCella(1,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(2,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(3,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(4,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(5,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(6,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(7,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(8,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(9,RGB(255,255,255),RGB(0,0,0))
               '-------------------------------
               '
               '-------------------------------
               T5 = Array(T5,"  ","  ","  ","  ","  ","  ","  ","  ","  ","  ")
               Call AddRigaTabella(T5)
               Call SetColoreCella(1,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(2,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(3,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(4,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(5,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(6,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(7,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(8,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(9,RGB(255,255,255),RGB(0,0,0))
               '-------------------------------
               If S1 > S2 Then : S5 = Fuori90(S1 - S4) Else S5 = Fuori90(S1 + S4)
               If S2 < S1 Then : S6 = Fuori90(S2 + S4) Else S6 = Fuori90(S2 - S4)
               '
               S7 = 0
               '
               '-------------------------------
               T6 = Array(T6,Format2(S1),Format2(S2),Format2(S3),"  ",S5,S6,S7,"Figura",Figura(A),Figura(B))
               Call AddRigaTabella(T6)
               Call SetColoreCella(1,RGB(26,217,136),RGB(0,0,0))
               Call SetColoreCella(2,RGB(26,217,136),RGB(0,0,0))
               Call SetColoreCella(3,RGB(255,187,9),RGB(0,0,0))
               Call SetColoreCella(4,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(5,RGB(223,249,3),RGB(0,0,0))
               Call SetColoreCella(6,RGB(223,249,3),RGB(0,0,0))
               Call SetColoreCella(7,RGB(223,249,3),RGB(0,0,0))
               Call SetColoreCella(8,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(9,RGB(255,255,255),RGB(0,0,0))
               '-------------------------------
               '
               '-------------------------------
               T7 = Array(T7,"  ","  ","  ","  ","  ","  ","  ","Figura",Figura(C),Figura(D))
               Call AddRigaTabella(T7)
               Call SetColoreCella(1,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(2,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(3,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(4,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(5,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(6,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(7,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(8,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(9,RGB(255,255,255),RGB(0,0,0))
               '-------------------------------
               '-------------------------------
               T8 = Array(T8,"  ","  ","  ","  ",S8,S9,"  ","  ","  ","  ")
               Call AddRigaTabella(T8)
               Call SetColoreCella(1,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(2,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(3,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(4,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(5,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(6,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(7,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(8,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(9,RGB(255,255,255),RGB(0,0,0))
               '-------------------------------
               '
               '-------------------------------
               T9 = Array(T9,A,B,N8,"  ",S11,S11,"  ","  ","  ","  ")
               Call AddRigaTabella(T9)
               Call SetColoreCella(1,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(2,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(3,RGB(26,217,136),RGB(0,0,0))
               Call SetColoreCella(4,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(5,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(6,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(7,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(8,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(9,RGB(255,255,255),RGB(0,0,0))
               '-------------------------------
               '-------------------------------
               T10 = Array(T10,C,D,N9,"  ","  ","  ","  ","  ","  ","  ")
               Call AddRigaTabella(T10)
               Call SetColoreCella(1,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(2,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(3,RGB(26,217,136),RGB(0,0,0))
               Call SetColoreCella(4,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(5,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(6,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(7,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(8,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(9,RGB(255,255,255),RGB(0,0,0))
               '-------------------------------
               '-------------------------------
               T11 = Array(T11,"  ","  ",S10,"  ",S12,S13,S7,"  ","  ","  ")
               Call AddRigaTabella(T11)
               Call SetColoreCella(1,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(2,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(3,RGB(255,187,9),RGB(0,0,0))
               Call SetColoreCella(4,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(5,RGB(223,249,3),RGB(0,0,0))
               Call SetColoreCella(6,RGB(223,249,3),RGB(0,0,0))
               Call SetColoreCella(7,RGB(223,249,3),RGB(0,0,0))
               Call SetColoreCella(8,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(9,RGB(255,255,255),RGB(0,0,0))
               '-------------------------------
               '-------------------------------
               T12 = Array(T12,"  ","  ","  ","  ","  ","  ","  ","  ","  ","  ")
               Call AddRigaTabella(T12)
               Call SetColoreCella(1,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(2,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(3,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(4,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(5,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(6,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(7,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(8,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(9,RGB(255,255,255),RGB(0,0,0))
               '-------------------------------
               '
               '-------------------------------
               T13 = Array(T13,"  ","  ","  ","  ","  ","  ","  ","  ","  ","  ")
               Call AddRigaTabella(T13)
               Call SetColoreCella(1,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(2,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(3,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(4,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(5,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(6,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(7,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(8,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(9,RGB(255,255,255),RGB(0,0,0))
               '-------------------------------
               '-------------------------------
               Call SetTableWidth("21%")
               CreaTabella
               '------------------------------
               ruota(1) = R1
               ruota(2) = R2
               '-----------------------------
               ruote(1) = R1
               ruote(2) = R2
               ruote(3) = 11
               ruote(4) = 12
               '----------------------------
               ambata1(1) = Fuori90(S5)
               ambata2(1) = Fuori90(S12)
               '
               ambo1(1) = ambata1(1)
               ambo1(2) = S1
               '----------------
               ambo2(1) = ambata1(1)
               ambo2(2) = S2
               '----------------
               '----------------
               ambo3(1) = ambata2(1)
               ambo3(2) = N8
               '----------------
               ambo4(1) = ambata2(1)
               ambo4(2) = N9
               '----------------
               '----------------
               ImpostaGiocata 1,ambata1,ruota,posta,K
               ImpostaGiocata 2,ambata2,ruota,posta,K
               Gioca ES,1,,1
               Scrivi
               Scrivi"............................"
               Scrivi
               ImpostaGiocata 1,ambo1,ruote,poste,K
               ImpostaGiocata 2,ambo2,ruote,poste,K
               ImpostaGiocata 3,ambo3,ruote,poste,K
               ImpostaGiocata 4,ambo4,ruote,poste,K
               Gioca ES,1,,1
               Scrivi
            End If
         Next
      Next
   Next
End Sub

quadrati 2x2
 
Ultima modifica:
Codice:
Sub Main
   Dim T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13
   Dim A,B,C,D,X,Y,K
   Dim ambata1(2),ambata2(2),ambata3(2),calc(10),ruota(5),ruote(5),posta(1),poste(2)
   Dim ambo1(2),ambo2(2),ambo3(2),ambo4(2),ambo5(2),ambo6(2),ambo7(2),ambo8(2),ambo9(2)
   Dim RS,RV,RX,RK,ES
   Dim R1,R2,P1,P2
   Dim S1,S2,S3,S4,S5,S6,S7,S8,S9,S10,S11,S12,S13,S14,S15,S16
   Dim N8,N9
   posta(1) = 1
   poste(2) = 1
   '
   RS = InputBox("Quante estrazioni vuoi controllare?",,0)
   K = 9
   For ES = EstrazioneFin - RS To EstrazioneFin
      AvanzamentoElab EstrazioneFin - RS,EstrazioneFin,ES
      For R1 = 1 To 8
         R2 = R1 + 3
         If R2 = 11 Then R2 = 12
         For P1 = 1 To 2
            P2 = P1 + 3
            '
            A = Estratto(ES,R1,P1)
            B = Estratto(ES,R1,P2)
            C = Estratto(ES,R2,P1)
            D = Estratto(ES,R2,P2)
            '
            N8 = Fuori90(A + B)
            N9 = Fuori90(C + D)
            '
            '
            ReDim MatriceCaselleDaEvid(4,1)
            '
            MatriceCaselleDaEvid(1,0) = R1
            MatriceCaselleDaEvid(1,1) = P1
            '
            MatriceCaselleDaEvid(2,0) = R1
            MatriceCaselleDaEvid(2,1) = P2
            '
            MatriceCaselleDaEvid(3,0) = R2
            MatriceCaselleDaEvid(3,1) = P1
            '
            MatriceCaselleDaEvid(4,0) = R2
            MatriceCaselleDaEvid(4,1) = P2
            '
            ReDim MatriceLegami(4,3)
            '
            MatriceLegami(1,0) = R1
            MatriceLegami(1,1) = P1
            MatriceLegami(1,2) = R1
            MatriceLegami(1,3) = P2
            '
            If R2 = 12 Then MatriceLegami(2,0) = R2 - 1 Else MatriceLegami(2,0) = R2
            MatriceLegami(2,1) = P1
            If R2 = 12 Then MatriceLegami(2,2) = R2 - 1 Else MatriceLegami(2,2) = R2
            MatriceLegami(2,3) = P2
            '
            MatriceLegami(3,0) = R1
            MatriceLegami(3,1) = P1
            If R2 = 12 Then MatriceLegami(3,2) = R2 - 1 Else MatriceLegami(3,2) = R2
            MatriceLegami(3,3) = P1
            '
            MatriceLegami(4,0) = R1
            MatriceLegami(4,1) = P2
            If R2 = 12 Then MatriceLegami(4,2) = R2 - 1 Else MatriceLegami(4,2) = R2
            MatriceLegami(4,3) = P2
            '
            '
            Call DisegnaEstrazione(ES,MatriceCaselleDaEvid,MatriceLegami)
            '
            '
            T1 = Array(T1,"So1","So2","Diff","  ","So3","So4","Diff","1Ambo",A,B)
            Call InitTabella(T1)
            Call SetColoreCella(1,RGB(255,255,255),RGB(0,0,0))
            Call SetColoreCella(2,RGB(255,255,255),RGB(0,0,0))
            Call SetColoreCella(3,RGB(255,255,255),RGB(0,0,0))
            Call SetColoreCella(4,RGB(255,255,255),RGB(0,0,0))
            Call SetColoreCella(5,RGB(255,255,255),RGB(0,0,0))
            Call SetColoreCella(6,RGB(255,255,255),RGB(0,0,0))
            Call SetColoreCella(7,RGB(255,255,255),RGB(0,0,0))
            Call SetColoreCella(8,RGB(255,255,255),RGB(0,0,0))
            Call SetColoreCella(9,RGB(255,255,255),RGB(0,0,0))
            '-------------------------------
            '
            '------------------------------------------------
            T2 = Array(T2,"  ","  ","  ","  ","  ","  ","  ","2Ambo",C,D)
            Call AddRigaTabella(T2)
            Call SetColoreCella(1,RGB(255,255,255),RGB(0,0,0))
            Call SetColoreCella(2,RGB(255,255,255),RGB(0,0,0))
            Call SetColoreCella(3,RGB(255,255,255),RGB(0,0,0))
            Call SetColoreCella(4,RGB(255,255,255),RGB(0,0,0))
            Call SetColoreCella(5,RGB(255,255,255),RGB(0,0,0))
            Call SetColoreCella(6,RGB(255,255,255),RGB(0,0,0))
            Call SetColoreCella(7,RGB(255,255,255),RGB(0,0,0))
            Call SetColoreCella(8,RGB(255,255,255),RGB(0,0,0))
            Call SetColoreCella(9,RGB(255,255,255),RGB(0,0,0))
            '-------------------------------
            S1 = Fuori90(A + C)
            S2 = Fuori90(B + D)
            S3 = Differenza(S1,S2)
            '
            S8 = Fuori90(A + B)
            S9 = Fuori90(C + D)
            S10 = Differenza(S8,S9)
            S11 = S10/2
            '-------------------------------
            If S8 > S9 Then : S12 = Fuori90(S8 - S11) Else S12 = Fuori90(S8 + S11)
            If S9 < S8 Then : S13 = Fuori90(S9 + S11) Else S13 = Fuori90(S9 - S11)
            '
            '-------------------------------
            If S1 > S2 Then S1 = S1 & "-" Else S2 = S2 & "-"
            If S2 < S1 Then S2 = S2 & "+" Else S1 = S1 & "+"
            '-------------------------------
            If S8 > S9 Then S8 = S8 & "-" Else S9 = S9 & "-"
            If S9 < S8 Then S9 = S9 & "+" Else S8 = S8 & "+"
            '
            '
            A = A & "+" : B = B & "+"
            '-------------------------------
            '-----------------------------------------------
            T3 = Array(T3,A,B,"  ","  ",S1,S2," ","  ","  ","  ")
            Call AddRigaTabella(T3)
            Call SetColoreCella(1,RGB(255,255,255),RGB(0,0,0))
            Call SetColoreCella(2,RGB(255,255,255),RGB(0,0,0))
            Call SetColoreCella(3,RGB(255,255,255),RGB(0,0,0))
            Call SetColoreCella(4,RGB(255,255,255),RGB(0,0,0))
            Call SetColoreCella(5,RGB(255,255,255),RGB(0,0,0))
            Call SetColoreCella(6,RGB(255,255,255),RGB(0,0,0))
            Call SetColoreCella(7,RGB(255,255,255),RGB(0,0,0))
            Call SetColoreCella(8,RGB(255,255,255),RGB(0,0,0))
            Call SetColoreCella(9,RGB(255,255,255),RGB(0,0,0))
            '-------------------------------
            S1 = Fuori90(A + C)
            S2 = Fuori90(B + D)
            S3 = Differenza(S1,S2)
            S4 = S3/2
            If pari(S3) Then
               '
               '-------------------------------
               T4 = Array(T4,C,D,"  ","  ",S4,S4," ","  ","  ","  ")
               Call AddRigaTabella(T4)
               Call SetColoreCella(1,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(2,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(3,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(4,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(5,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(6,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(7,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(8,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(9,RGB(255,255,255),RGB(0,0,0))
               '-------------------------------
               '
               '-------------------------------
               T5 = Array(T5,"  ","  ","  ","  ","  ","  ","  ","  ","  ","  ")
               Call AddRigaTabella(T5)
               Call SetColoreCella(1,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(2,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(3,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(4,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(5,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(6,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(7,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(8,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(9,RGB(255,255,255),RGB(0,0,0))
               '-------------------------------
               If S1 > S2 Then : S5 = Fuori90(S1 - S4) Else S5 = Fuori90(S1 + S4)
               If S2 < S1 Then : S6 = Fuori90(S2 + S4) Else S6 = Fuori90(S2 - S4)
               '
               S7 = 0
               '
               '-------------------------------
               T6 = Array(T6,Format2(S1),Format2(S2),Format2(S3),"  ",S5,S6,S7,"Figura",Figura(A),Figura(B))
               Call AddRigaTabella(T6)
               Call SetColoreCella(1,RGB(26,217,136),RGB(0,0,0))
               Call SetColoreCella(2,RGB(26,217,136),RGB(0,0,0))
               Call SetColoreCella(3,RGB(255,187,9),RGB(0,0,0))
               Call SetColoreCella(4,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(5,RGB(223,249,3),RGB(0,0,0))
               Call SetColoreCella(6,RGB(223,249,3),RGB(0,0,0))
               Call SetColoreCella(7,RGB(223,249,3),RGB(0,0,0))
               Call SetColoreCella(8,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(9,RGB(255,255,255),RGB(0,0,0))
               '-------------------------------
               '
               '-------------------------------
               T7 = Array(T7,"  ","  ","  ","  ","  ","  ","  ","Figura",Figura(C),Figura(D))
               Call AddRigaTabella(T7)
               Call SetColoreCella(1,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(2,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(3,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(4,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(5,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(6,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(7,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(8,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(9,RGB(255,255,255),RGB(0,0,0))
               '-------------------------------
               '-------------------------------
               T8 = Array(T8,"  ","  ","  ","  ",S8,S9,"  ","  ","  ","  ")
               Call AddRigaTabella(T8)
               Call SetColoreCella(1,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(2,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(3,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(4,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(5,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(6,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(7,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(8,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(9,RGB(255,255,255),RGB(0,0,0))
               '-------------------------------
               '
               '-------------------------------
               T9 = Array(T9,A,B,N8,"  ",S11,S11,"  ","  ","  ","  ")
               Call AddRigaTabella(T9)
               Call SetColoreCella(1,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(2,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(3,RGB(26,217,136),RGB(0,0,0))
               Call SetColoreCella(4,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(5,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(6,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(7,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(8,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(9,RGB(255,255,255),RGB(0,0,0))
               '-------------------------------
               '-------------------------------
               T10 = Array(T10,C,D,N9,"  ","  ","  ","  ","  ","  ","  ")
               Call AddRigaTabella(T10)
               Call SetColoreCella(1,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(2,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(3,RGB(26,217,136),RGB(0,0,0))
               Call SetColoreCella(4,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(5,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(6,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(7,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(8,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(9,RGB(255,255,255),RGB(0,0,0))
               '-------------------------------
               '-------------------------------
               T11 = Array(T11,"  ","  ",S10,"  ",S12,S13,S7,"  ","  ","  ")
               Call AddRigaTabella(T11)
               Call SetColoreCella(1,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(2,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(3,RGB(255,187,9),RGB(0,0,0))
               Call SetColoreCella(4,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(5,RGB(223,249,3),RGB(0,0,0))
               Call SetColoreCella(6,RGB(223,249,3),RGB(0,0,0))
               Call SetColoreCella(7,RGB(223,249,3),RGB(0,0,0))
               Call SetColoreCella(8,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(9,RGB(255,255,255),RGB(0,0,0))
               '-------------------------------
               '-------------------------------
               T12 = Array(T12,"  ","  ","  ","  ","  ","  ","  ","  ","  ","  ")
               Call AddRigaTabella(T12)
               Call SetColoreCella(1,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(2,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(3,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(4,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(5,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(6,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(7,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(8,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(9,RGB(255,255,255),RGB(0,0,0))
               '-------------------------------
               '
               '-------------------------------
               T13 = Array(T13,"  ","  ","  ","  ","  ","  ","  ","  ","  ","  ")
               Call AddRigaTabella(T13)
               Call SetColoreCella(1,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(2,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(3,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(4,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(5,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(6,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(7,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(8,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(9,RGB(255,255,255),RGB(0,0,0))
               '-------------------------------
               '-------------------------------
               Call SetTableWidth("21%")
               CreaTabella
               '------------------------------
               ruota(1) = R1
               ruota(2) = R2
               '-----------------------------
               ruote(1) = R1
               ruote(2) = R2
               ruote(3) = 11
               ruote(4) = 12
               '----------------------------
               ambata1(1) = Fuori90(S5)
               ambata2(1) = Fuori90(S12)
               '
               ambo1(1) = ambata1(1)
               ambo1(2) = S1
               '----------------
               ambo2(1) = ambata1(1)
               ambo2(2) = S2
               '----------------
               '----------------
               ambo3(1) = ambata2(1)
               ambo3(2) = N8
               '----------------
               ambo4(1) = ambata2(1)
               ambo4(2) = N9
               '----------------
               '----------------
               ImpostaGiocata 1,ambata1,ruota,posta,K
               ImpostaGiocata 2,ambata2,ruota,posta,K
               Gioca ES,1,,1
               Scrivi
               Scrivi"............................"
               Scrivi
               ImpostaGiocata 1,ambo1,ruote,poste,K
               ImpostaGiocata 2,ambo2,ruote,poste,K
               ImpostaGiocata 3,ambo3,ruote,poste,K
               ImpostaGiocata 4,ambo4,ruote,poste,K
               Gioca ES,1,,1
               Scrivi
            End If
         Next
      Next
   Next
End Sub

quadrati 4x4
 
Ultima modifica:
Codice:
Sub Main
   Dim T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13
   Dim A,B,C,D,X,Y,K
   Dim ambata1(2),ambata2(2),ambata3(2),calc(10),ruota(5),ruote(5),posta(1),poste(2)
   Dim ambo1(2),ambo2(2),ambo3(2),ambo4(2),ambo5(2),ambo6(2),ambo7(2),ambo8(2),ambo9(2)
   Dim RS,RV,RX,RK,ES
   Dim R1,R2,P1,P2
   Dim S1,S2,S3,S4,S5,S6,S7,S8,S9,S10,S11,S12,S13,S14,S15,S16
   Dim N8,N9
   posta(1) = 1
   poste(2) = 1
   '
   RS = InputBox("Quante estrazioni vuoi controllare?",,0)
   K = 9
   For ES = EstrazioneFin - RS To EstrazioneFin
      AvanzamentoElab EstrazioneFin - RS,EstrazioneFin,ES
      For R1 = 1 To 7
         R2 = R1 + 4
         If R2 = 11 Then R2 = 12
         For P1 = 1 To 1
            P2 = P1 + 4
            '
            A = Estratto(ES,R1,P1)
            B = Estratto(ES,R1,P2)
            C = Estratto(ES,R2,P1)
            D = Estratto(ES,R2,P2)
            '
            N8 = Fuori90(A + B)
            N9 = Fuori90(C + D)
            '
            '
            ReDim MatriceCaselleDaEvid(4,1)
            '
            MatriceCaselleDaEvid(1,0) = R1
            MatriceCaselleDaEvid(1,1) = P1
            '
            MatriceCaselleDaEvid(2,0) = R1
            MatriceCaselleDaEvid(2,1) = P2
            '
            MatriceCaselleDaEvid(3,0) = R2
            MatriceCaselleDaEvid(3,1) = P1
            '
            MatriceCaselleDaEvid(4,0) = R2
            MatriceCaselleDaEvid(4,1) = P2
            '
            ReDim MatriceLegami(4,3)
            '
            MatriceLegami(1,0) = R1
            MatriceLegami(1,1) = P1
            MatriceLegami(1,2) = R1
            MatriceLegami(1,3) = P2
            '
            If R2 = 12 Then MatriceLegami(2,0) = R2 - 1 Else MatriceLegami(2,0) = R2
            MatriceLegami(2,1) = P1
            If R2 = 12 Then MatriceLegami(2,2) = R2 - 1 Else MatriceLegami(2,2) = R2
            MatriceLegami(2,3) = P2
            '
            MatriceLegami(3,0) = R1
            MatriceLegami(3,1) = P1
            If R2 = 12 Then MatriceLegami(3,2) = R2 - 1 Else MatriceLegami(3,2) = R2
            MatriceLegami(3,3) = P1
            '
            MatriceLegami(4,0) = R1
            MatriceLegami(4,1) = P2
            If R2 = 12 Then MatriceLegami(4,2) = R2 - 1 Else MatriceLegami(4,2) = R2
            MatriceLegami(4,3) = P2
            '
            '
            Call DisegnaEstrazione(ES,MatriceCaselleDaEvid,MatriceLegami)
            '
            '
            T1 = Array(T1,"So1","So2","Diff","  ","So3","So4","Diff","1Ambo",A,B)
            Call InitTabella(T1)
            Call SetColoreCella(1,RGB(255,255,255),RGB(0,0,0))
            Call SetColoreCella(2,RGB(255,255,255),RGB(0,0,0))
            Call SetColoreCella(3,RGB(255,255,255),RGB(0,0,0))
            Call SetColoreCella(4,RGB(255,255,255),RGB(0,0,0))
            Call SetColoreCella(5,RGB(255,255,255),RGB(0,0,0))
            Call SetColoreCella(6,RGB(255,255,255),RGB(0,0,0))
            Call SetColoreCella(7,RGB(255,255,255),RGB(0,0,0))
            Call SetColoreCella(8,RGB(255,255,255),RGB(0,0,0))
            Call SetColoreCella(9,RGB(255,255,255),RGB(0,0,0))
            '-------------------------------
            '
            '------------------------------------------------
            T2 = Array(T2,"  ","  ","  ","  ","  ","  ","  ","2Ambo",C,D)
            Call AddRigaTabella(T2)
            Call SetColoreCella(1,RGB(255,255,255),RGB(0,0,0))
            Call SetColoreCella(2,RGB(255,255,255),RGB(0,0,0))
            Call SetColoreCella(3,RGB(255,255,255),RGB(0,0,0))
            Call SetColoreCella(4,RGB(255,255,255),RGB(0,0,0))
            Call SetColoreCella(5,RGB(255,255,255),RGB(0,0,0))
            Call SetColoreCella(6,RGB(255,255,255),RGB(0,0,0))
            Call SetColoreCella(7,RGB(255,255,255),RGB(0,0,0))
            Call SetColoreCella(8,RGB(255,255,255),RGB(0,0,0))
            Call SetColoreCella(9,RGB(255,255,255),RGB(0,0,0))
            '-------------------------------
            S1 = Fuori90(A + C)
            S2 = Fuori90(B + D)
            S3 = Differenza(S1,S2)
            '
            S8 = Fuori90(A + B)
            S9 = Fuori90(C + D)
            S10 = Differenza(S8,S9)
            S11 = S10/2
            '-------------------------------
            If S8 > S9 Then : S12 = Fuori90(S8 - S11) Else S12 = Fuori90(S8 + S11)
            If S9 < S8 Then : S13 = Fuori90(S9 + S11) Else S13 = Fuori90(S9 - S11)
            '
            '-------------------------------
            If S1 > S2 Then S1 = S1 & "-" Else S2 = S2 & "-"
            If S2 < S1 Then S2 = S2 & "+" Else S1 = S1 & "+"
            '-------------------------------
            If S8 > S9 Then S8 = S8 & "-" Else S9 = S9 & "-"
            If S9 < S8 Then S9 = S9 & "+" Else S8 = S8 & "+"
            '
            '
            A = A & "+" : B = B & "+"
            '-------------------------------
            '-----------------------------------------------
            T3 = Array(T3,A,B,"  ","  ",S1,S2," ","  ","  ","  ")
            Call AddRigaTabella(T3)
            Call SetColoreCella(1,RGB(255,255,255),RGB(0,0,0))
            Call SetColoreCella(2,RGB(255,255,255),RGB(0,0,0))
            Call SetColoreCella(3,RGB(255,255,255),RGB(0,0,0))
            Call SetColoreCella(4,RGB(255,255,255),RGB(0,0,0))
            Call SetColoreCella(5,RGB(255,255,255),RGB(0,0,0))
            Call SetColoreCella(6,RGB(255,255,255),RGB(0,0,0))
            Call SetColoreCella(7,RGB(255,255,255),RGB(0,0,0))
            Call SetColoreCella(8,RGB(255,255,255),RGB(0,0,0))
            Call SetColoreCella(9,RGB(255,255,255),RGB(0,0,0))
            '-------------------------------
            S1 = Fuori90(A + C)
            S2 = Fuori90(B + D)
            S3 = Differenza(S1,S2)
            S4 = S3/2
            If pari(S3) Then
               '
               '-------------------------------
               T4 = Array(T4,C,D,"  ","  ",S4,S4," ","  ","  ","  ")
               Call AddRigaTabella(T4)
               Call SetColoreCella(1,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(2,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(3,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(4,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(5,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(6,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(7,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(8,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(9,RGB(255,255,255),RGB(0,0,0))
               '-------------------------------
               '
               '-------------------------------
               T5 = Array(T5,"  ","  ","  ","  ","  ","  ","  ","  ","  ","  ")
               Call AddRigaTabella(T5)
               Call SetColoreCella(1,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(2,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(3,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(4,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(5,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(6,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(7,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(8,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(9,RGB(255,255,255),RGB(0,0,0))
               '-------------------------------
               If S1 > S2 Then : S5 = Fuori90(S1 - S4) Else S5 = Fuori90(S1 + S4)
               If S2 < S1 Then : S6 = Fuori90(S2 + S4) Else S6 = Fuori90(S2 - S4)
               '
               S7 = 0
               '
               '-------------------------------
               T6 = Array(T6,Format2(S1),Format2(S2),Format2(S3),"  ",S5,S6,S7,"Figura",Figura(A),Figura(B))
               Call AddRigaTabella(T6)
               Call SetColoreCella(1,RGB(26,217,136),RGB(0,0,0))
               Call SetColoreCella(2,RGB(26,217,136),RGB(0,0,0))
               Call SetColoreCella(3,RGB(255,187,9),RGB(0,0,0))
               Call SetColoreCella(4,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(5,RGB(223,249,3),RGB(0,0,0))
               Call SetColoreCella(6,RGB(223,249,3),RGB(0,0,0))
               Call SetColoreCella(7,RGB(223,249,3),RGB(0,0,0))
               Call SetColoreCella(8,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(9,RGB(255,255,255),RGB(0,0,0))
               '-------------------------------
               '
               '-------------------------------
               T7 = Array(T7,"  ","  ","  ","  ","  ","  ","  ","Figura",Figura(C),Figura(D))
               Call AddRigaTabella(T7)
               Call SetColoreCella(1,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(2,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(3,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(4,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(5,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(6,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(7,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(8,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(9,RGB(255,255,255),RGB(0,0,0))
               '-------------------------------
               '-------------------------------
               T8 = Array(T8,"  ","  ","  ","  ",S8,S9,"  ","  ","  ","  ")
               Call AddRigaTabella(T8)
               Call SetColoreCella(1,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(2,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(3,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(4,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(5,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(6,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(7,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(8,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(9,RGB(255,255,255),RGB(0,0,0))
               '-------------------------------
               '
               '-------------------------------
               T9 = Array(T9,A,B,N8,"  ",S11,S11,"  ","  ","  ","  ")
               Call AddRigaTabella(T9)
               Call SetColoreCella(1,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(2,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(3,RGB(26,217,136),RGB(0,0,0))
               Call SetColoreCella(4,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(5,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(6,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(7,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(8,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(9,RGB(255,255,255),RGB(0,0,0))
               '-------------------------------
               '-------------------------------
               T10 = Array(T10,C,D,N9,"  ","  ","  ","  ","  ","  ","  ")
               Call AddRigaTabella(T10)
               Call SetColoreCella(1,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(2,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(3,RGB(26,217,136),RGB(0,0,0))
               Call SetColoreCella(4,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(5,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(6,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(7,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(8,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(9,RGB(255,255,255),RGB(0,0,0))
               '-------------------------------
               '-------------------------------
               T11 = Array(T11,"  ","  ",S10,"  ",S12,S13,S7,"  ","  ","  ")
               Call AddRigaTabella(T11)
               Call SetColoreCella(1,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(2,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(3,RGB(255,187,9),RGB(0,0,0))
               Call SetColoreCella(4,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(5,RGB(223,249,3),RGB(0,0,0))
               Call SetColoreCella(6,RGB(223,249,3),RGB(0,0,0))
               Call SetColoreCella(7,RGB(223,249,3),RGB(0,0,0))
               Call SetColoreCella(8,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(9,RGB(255,255,255),RGB(0,0,0))
               '-------------------------------
               '-------------------------------
               T12 = Array(T12,"  ","  ","  ","  ","  ","  ","  ","  ","  ","  ")
               Call AddRigaTabella(T12)
               Call SetColoreCella(1,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(2,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(3,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(4,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(5,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(6,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(7,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(8,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(9,RGB(255,255,255),RGB(0,0,0))
               '-------------------------------
               '
               '-------------------------------
               T13 = Array(T13,"  ","  ","  ","  ","  ","  ","  ","  ","  ","  ")
               Call AddRigaTabella(T13)
               Call SetColoreCella(1,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(2,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(3,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(4,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(5,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(6,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(7,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(8,RGB(255,255,255),RGB(0,0,0))
               Call SetColoreCella(9,RGB(255,255,255),RGB(0,0,0))
               '-------------------------------
               '-------------------------------
               Call SetTableWidth("21%")
               CreaTabella
               '------------------------------
               ruota(1) = R1
               ruota(2) = R2
               '-----------------------------
               ruote(1) = R1
               ruote(2) = R2
               ruote(3) = 11
               ruote(4) = 12
               '----------------------------
               ambata1(1) = Fuori90(S5)
               ambata2(1) = Fuori90(S12)
               '
               ambo1(1) = ambata1(1)
               ambo1(2) = S1
               '----------------
               ambo2(1) = ambata1(1)
               ambo2(2) = S2
               '----------------
               '----------------
               ambo3(1) = ambata2(1)
               ambo3(2) = N8
               '----------------
               ambo4(1) = ambata2(1)
               ambo4(2) = N9
               '----------------
               '----------------
               ImpostaGiocata 1,ambata1,ruota,posta,K
               ImpostaGiocata 2,ambata2,ruota,posta,K
               Gioca ES,1,,1
               Scrivi
               Scrivi"............................"
               Scrivi
               ImpostaGiocata 1,ambo1,ruote,poste,K
               ImpostaGiocata 2,ambo2,ruote,poste,K
               ImpostaGiocata 3,ambo3,ruote,poste,K
               ImpostaGiocata 4,ambo4,ruote,poste,K
               Gioca ES,1,,1
               Scrivi
            End If
         Next
      Next
   Next
End Sub

quadrati 5x5
 
Ultima modifica:
se vi interessano ho realizzato anche una quadratura sugli ambi ripetuti
e anche su questo script ci sto lavorando se vi interessano qualche altro script scrivete qua..
 
Ultima modifica:
Codice:
Sub Main
   Dim T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12
   Dim A,B,C,D,X,Y
   Dim ambata1(2),ambata2(2),ambata3(2),calc(10),ruota(5),ruote(5),posta(1),poste(2)
   Dim ambo1(2),ambo2(2),ambo3(2),ambo4(2),ambo5(2),ambo6(2),ambo7(2),ambo8(2),ambo9(2)
   Dim cinquina(5)
   Dim rs,rv,rx,rk
   Dim r1,r2,r3,r4
   posta(1) = 1
   poste(2) = 1
   '
   rs = InputBox("Quante estrazioni vuoi controllare?",,0)
   k = 0
   For es = EstrazioneFin - rs To EstrazioneFin
      AvanzamentoElab EstrazioneFin - rs,EstrazioneFin,es
      For r1 = 1 To 10
         For r2 = r1 + 1 To 11
            If r2 = 11 Then r2 = 12
            For p1 = 1 To 4
               For p2 = p1 + 1 To 5
                  '
                  For p3 = 1 To 4
                     For p4 = p3 + 1 To 5
                        '
                        A = Estratto(es,r1,p1)
                        B = Estratto(es,r1,p2)
                        C = Estratto(es,r2,p3)
                        D = Estratto(es,r2,p4)
                        '
                        If A = C And B = D Or A = D And B = C Then
                           '
                           '
                           ReDim MatriceCaselleDaEvid(4,1)
                           '
                           MatriceCaselleDaEvid(1,0) = r1
                           MatriceCaselleDaEvid(1,1) = p1
                           '
                           MatriceCaselleDaEvid(2,0) = r1
                           MatriceCaselleDaEvid(2,1) = p2
                           '
                           MatriceCaselleDaEvid(3,0) = r2
                           MatriceCaselleDaEvid(3,1) = p3
                           '
                           MatriceCaselleDaEvid(4,0) = r2
                           MatriceCaselleDaEvid(4,1) = p4
                           '
                           Call DisegnaEstrazione(es,MatriceCaselleDaEvid)
                           '
                           '
                           T1 = Array(T1,"So1","So2","Diff","  ","So3","So4","Diff","1Ambo",A,B)
                           Call InitTabella(T1)
                           Call SetColoreCella(1,RGB(255,255,255),RGB(0,0,0))
                           Call SetColoreCella(2,RGB(255,255,255),RGB(0,0,0))
                           Call SetColoreCella(3,RGB(255,255,255),RGB(0,0,0))
                           Call SetColoreCella(4,RGB(255,255,255),RGB(0,0,0))
                           Call SetColoreCella(5,RGB(255,255,255),RGB(0,0,0))
                           Call SetColoreCella(6,RGB(255,255,255),RGB(0,0,0))
                           Call SetColoreCella(7,RGB(255,255,255),RGB(0,0,0))
                           Call SetColoreCella(8,RGB(255,255,255),RGB(0,0,0))
                           Call SetColoreCella(9,RGB(255,255,255),RGB(0,0,0))
                           '-------------------------------
                           '
                           '------------------------------------------------
                           T2 = Array(T2,"  ","  ","  ","  ","  ","  ","  ","2Ambo",C,D)
                           Call AddRigaTabella(T2)
                           Call SetColoreCella(1,RGB(255,255,255),RGB(0,0,0))
                           Call SetColoreCella(2,RGB(255,255,255),RGB(0,0,0))
                           Call SetColoreCella(3,RGB(255,255,255),RGB(0,0,0))
                           Call SetColoreCella(4,RGB(255,255,255),RGB(0,0,0))
                           Call SetColoreCella(5,RGB(255,255,255),RGB(0,0,0))
                           Call SetColoreCella(6,RGB(255,255,255),RGB(0,0,0))
                           Call SetColoreCella(7,RGB(255,255,255),RGB(0,0,0))
                           Call SetColoreCella(8,RGB(255,255,255),RGB(0,0,0))
                           Call SetColoreCella(9,RGB(255,255,255),RGB(0,0,0))
                           '-------------------------------
                           S1 = Fuori90(A + C)
                           S2 = Fuori90(B + D)
                           S3 = Differenza(S1,S2)
                           '-------------------------------
                           '-------------------------------
                           If S1 > S2 Then S1 = S1 & "-" Else S2 = S2 & "-"
                           If S2 < S1 Then S2 = S2 & "+" Else S1 = S1 & "+"
                           '-------------------------------
                           A = A & "+" : B = B & "+"
                           '-----------------------------------------------
                           T3 = Array(T3,A,B," ","  ",S1,S2," ","  ","  ","  ")
                           Call AddRigaTabella(T3)
                           Call SetColoreCella(1,RGB(255,255,255),RGB(0,0,0))
                           Call SetColoreCella(2,RGB(255,255,255),RGB(0,0,0))
                           Call SetColoreCella(3,RGB(255,255,255),RGB(0,0,0))
                           Call SetColoreCella(4,RGB(255,255,255),RGB(0,0,0))
                           Call SetColoreCella(5,RGB(255,255,255),RGB(0,0,0))
                           Call SetColoreCella(6,RGB(255,255,255),RGB(0,0,0))
                           Call SetColoreCella(7,RGB(255,255,255),RGB(0,0,0))
                           Call SetColoreCella(8,RGB(255,255,255),RGB(0,0,0))
                           Call SetColoreCella(9,RGB(255,255,255),RGB(0,0,0))
                           '-------------------------------
                           S1 = Fuori90(A + C)
                           S2 = Fuori90(B + D)
                           S3 = Differenza(S1,S2)
                           S4 = S3/2
                           If pari(S3) Then
                              '
                              '-------------------------------
                              T4 = Array(T4,C,D," ","  ",S4,S4," ","  ","  ","  ")
                              Call AddRigaTabella(T4)
                              Call SetColoreCella(1,RGB(255,255,255),RGB(0,0,0))
                              Call SetColoreCella(2,RGB(255,255,255),RGB(0,0,0))
                              Call SetColoreCella(3,RGB(255,255,255),RGB(0,0,0))
                              Call SetColoreCella(4,RGB(255,255,255),RGB(0,0,0))
                              Call SetColoreCella(5,RGB(255,255,255),RGB(0,0,0))
                              Call SetColoreCella(6,RGB(255,255,255),RGB(0,0,0))
                              Call SetColoreCella(7,RGB(255,255,255),RGB(0,0,0))
                              Call SetColoreCella(8,RGB(255,255,255),RGB(0,0,0))
                              Call SetColoreCella(9,RGB(255,255,255),RGB(0,0,0))
                              '-------------------------------
                              '
                              '-------------------------------
                              T5 = Array(T5,"  ","  ","  ","  ","  ","  ","  ","  ","  ","  ")
                              Call AddRigaTabella(T5)
                              Call SetColoreCella(1,RGB(255,255,255),RGB(0,0,0))
                              Call SetColoreCella(2,RGB(255,255,255),RGB(0,0,0))
                              Call SetColoreCella(3,RGB(255,255,255),RGB(0,0,0))
                              Call SetColoreCella(4,RGB(255,255,255),RGB(0,0,0))
                              Call SetColoreCella(5,RGB(255,255,255),RGB(0,0,0))
                              Call SetColoreCella(6,RGB(255,255,255),RGB(0,0,0))
                              Call SetColoreCella(7,RGB(255,255,255),RGB(0,0,0))
                              Call SetColoreCella(8,RGB(255,255,255),RGB(0,0,0))
                              Call SetColoreCella(9,RGB(255,255,255),RGB(0,0,0))
                              '-------------------------------
                              S1 = Fuori90(A + C)
                              S2 = Fuori90(B + D)
                              S3 = Differenza(S1,S2)
                              S4 = S3/2
                              If S1 > S2 Then S5 = Fuori90(S1 - S4) Else S5 = Fuori90(S1 + S4)
                              If S2 < S1 Then S6 = Fuori90(S2 + S4) Else S6 = Fuori90(S2 - S4)
                              '
                              S9 = 0
                              '
                              '-------------------------------
                              T6 = Array(T6,Format2(S1),Format2(S2),Format2(S3),"  ",S5,S6,S9,"Figura",Figura(A),Figura(B))
                              Call AddRigaTabella(T6)
                              Call SetColoreCella(1,RGB(26,217,136),RGB(0,0,0))
                              Call SetColoreCella(2,RGB(26,217,136),RGB(0,0,0))
                              Call SetColoreCella(3,RGB(255,187,9),RGB(0,0,0))
                              Call SetColoreCella(4,RGB(255,255,255),RGB(0,0,0))
                              Call SetColoreCella(5,RGB(223,249,3),RGB(0,0,0))
                              Call SetColoreCella(6,RGB(223,249,3),RGB(0,0,0))
                              Call SetColoreCella(7,RGB(223,249,3),RGB(0,0,0))
                              Call SetColoreCella(8,RGB(255,255,255),RGB(0,0,0))
                              Call SetColoreCella(9,RGB(255,255,255),RGB(0,0,0))
                              '-------------------------------
                              '
                              '-------------------------------
                              T7 = Array(T7,"  ","  ","  ","  ","  ","  ","  ","Figura",Figura(C),Figura(D))
                              Call AddRigaTabella(T7)
                              Call SetColoreCella(1,RGB(255,255,255),RGB(0,0,0))
                              Call SetColoreCella(2,RGB(255,255,255),RGB(0,0,0))
                              Call SetColoreCella(3,RGB(255,255,255),RGB(0,0,0))
                              Call SetColoreCella(4,RGB(255,255,255),RGB(0,0,0))
                              Call SetColoreCella(5,RGB(255,255,255),RGB(0,0,0))
                              Call SetColoreCella(6,RGB(255,255,255),RGB(0,0,0))
                              Call SetColoreCella(7,RGB(255,255,255),RGB(0,0,0))
                              Call SetColoreCella(8,RGB(255,255,255),RGB(0,0,0))
                              Call SetColoreCella(9,RGB(255,255,255),RGB(0,0,0))
                              '-------------------------------
                              S1 = Fuori90(A + C)
                              S2 = Fuori90(B + D)
                              S3 = Differenza(S1,S2)
                              '-------------------------------
                              '-------------------------------
                              If S1 > S2 Then S1 = S1 & "+" Else S2 = S2 & "+"
                              If S2 < S1 Then S2 = S2 & "-" Else S1 = S1 & "-"
                              '-------------------------------
                              '-------------------------------
                              T8 = Array(T8,"  ","  ","  ","  ",S1,S2,"  ","  ","  ","  ")
                              Call AddRigaTabella(T8)
                              Call SetColoreCella(1,RGB(255,255,255),RGB(0,0,0))
                              Call SetColoreCella(2,RGB(255,255,255),RGB(0,0,0))
                              Call SetColoreCella(3,RGB(255,255,255),RGB(0,0,0))
                              Call SetColoreCella(4,RGB(255,255,255),RGB(0,0,0))
                              Call SetColoreCella(5,RGB(255,255,255),RGB(0,0,0))
                              Call SetColoreCella(6,RGB(255,255,255),RGB(0,0,0))
                              Call SetColoreCella(7,RGB(255,255,255),RGB(0,0,0))
                              Call SetColoreCella(8,RGB(255,255,255),RGB(0,0,0))
                              Call SetColoreCella(9,RGB(255,255,255),RGB(0,0,0))
                              '-------------------------------
                              S1 = Fuori90(A + C)
                              S2 = Fuori90(B + D)
                              S3 = Differenza(S1,S2)
                              S4 = S3/2
                              If pari(S3) Then
                                 '-------------------------------
                                 T9 = Array(T9,"  ","  ","  ","  ",S4,S4,"  ","  ","  ","  ")
                                 Call AddRigaTabella(T9)
                                 Call SetColoreCella(1,RGB(255,255,255),RGB(0,0,0))
                                 Call SetColoreCella(2,RGB(255,255,255),RGB(0,0,0))
                                 Call SetColoreCella(3,RGB(255,255,255),RGB(0,0,0))
                                 Call SetColoreCella(4,RGB(255,255,255),RGB(0,0,0))
                                 Call SetColoreCella(5,RGB(255,255,255),RGB(0,0,0))
                                 Call SetColoreCella(6,RGB(255,255,255),RGB(0,0,0))
                                 Call SetColoreCella(7,RGB(255,255,255),RGB(0,0,0))
                                 Call SetColoreCella(8,RGB(255,255,255),RGB(0,0,0))
                                 Call SetColoreCella(9,RGB(255,255,255),RGB(0,0,0))
                                 '-------------------------------
                                 '-------------------------------
                                 '-------------------------------
                                 T10 = Array(T10,"  ","  ","  ","  ","  ","  ","  ","  ","  ","  ")
                                 Call AddRigaTabella(T10)
                                 Call SetColoreCella(1,RGB(255,255,255),RGB(0,0,0))
                                 Call SetColoreCella(2,RGB(255,255,255),RGB(0,0,0))
                                 Call SetColoreCella(3,RGB(255,255,255),RGB(0,0,0))
                                 Call SetColoreCella(4,RGB(255,255,255),RGB(0,0,0))
                                 Call SetColoreCella(5,RGB(255,255,255),RGB(0,0,0))
                                 Call SetColoreCella(6,RGB(255,255,255),RGB(0,0,0))
                                 Call SetColoreCella(7,RGB(255,255,255),RGB(0,0,0))
                                 Call SetColoreCella(8,RGB(255,255,255),RGB(0,0,0))
                                 Call SetColoreCella(9,RGB(255,255,255),RGB(0,0,0))
                                 '-------------------------------
                                 S1 = Fuori90(A + C)
                                 S2 = Fuori90(B + D)
                                 S3 = Differenza(S1,S2)
                                 S4 = S3/2
                                 If S1 > S2 Then S7 = Fuori90(S1 + S4) Else S7 = Fuori90(S1 - S4)
                                 If S2 < S1 Then S8 = Fuori90(S2 - S4) Else S8 = Fuori90(S2 + S4)
                                 '
                                 '-------------------------------
                                 T11 = Array(T11,"  ","  ","  ","  ",S7,S8,"  ","  ","  ","  ")
                                 Call AddRigaTabella(T11)
                                 Call SetColoreCella(1,RGB(255,255,255),RGB(0,0,0))
                                 Call SetColoreCella(2,RGB(255,255,255),RGB(0,0,0))
                                 Call SetColoreCella(3,RGB(255,255,255),RGB(0,0,0))
                                 Call SetColoreCella(4,RGB(255,255,255),RGB(0,0,0))
                                 Call SetColoreCella(5,RGB(26,217,136),RGB(0,0,0))
                                 Call SetColoreCella(6,RGB(26,217,136),RGB(0,0,0))
                                 Call SetColoreCella(7,RGB(26,217,136),RGB(0,0,0))
                                 Call SetColoreCella(8,RGB(255,255,255),RGB(0,0,0))
                                 Call SetColoreCella(9,RGB(255,255,255),RGB(0,0,0))
                                 '-------------------------------
                                 '-------------------------------
                                 T12 = Array(T12,"  ","  ","  ","  ","  ","  ","  ","  ","  ","  ")
                                 Call AddRigaTabella(T12)
                                 Call SetColoreCella(1,RGB(255,255,255),RGB(0,0,0))
                                 Call SetColoreCella(2,RGB(255,255,255),RGB(0,0,0))
                                 Call SetColoreCella(3,RGB(255,255,255),RGB(0,0,0))
                                 Call SetColoreCella(4,RGB(255,255,255),RGB(0,0,0))
                                 Call SetColoreCella(5,RGB(255,255,255),RGB(0,0,0))
                                 Call SetColoreCella(6,RGB(255,255,255),RGB(0,0,0))
                                 Call SetColoreCella(7,RGB(255,255,255),RGB(0,0,0))
                                 Call SetColoreCella(8,RGB(255,255,255),RGB(0,0,0))
                                 Call SetColoreCella(9,RGB(255,255,255),RGB(0,0,0))
                                 '-------------------------------
                                 '
                                 '
                                 '-------------------------------
                                 Call SetTableWidth("21%")
                                 CreaTabella
                                 '------------------------------
                                 ruota(1) = r1
                                 ruota(2) = r2
                                 '-----------------------------
                                 ruote(1) = r1
                                 ruote(2) = r2
                                 ruote(3) = 11
                                 ruote(4) = 12
                                 '----------------------------
                                 ambata1(1) =(S5)
                                 '
                                 ambo1(1) = ambata1(1)
                                 ambo1(2) = S1
                                 '----------------
                                 ambo2(1) = ambata1(1)
                                 ambo2(2) = S2
                                 '----------------
                                 'If A = D And B = C Then
                                 ambo3(1) =(S5)
                                 ambo3(2) =(S7)
                                 ambo4(1) =(S5)
                                 ambo4(2) =(S8)
                                 '
                                 ambo5(1) =(S5)
                                 ambo5(2) = Fuori90(A + D)
                                 ambo6(1) =(S5)
                                 ambo6(2) = Fuori90(B + C)
                                 '
                                 If S5 < 46 Then
                                    ambo7(1) = Fuori90(S5 + A)
                                    ambo7(2) = Fuori90(S5 + B)
                                 Else
                                    ambo7(1) = Fuori90(Diametrale(S5) + A)
                                    ambo7(2) = Fuori90(Diametrale(S5) + B)
                                 End If
                                 '
                                 cinquina(1) = S5
                                 cinquina(2) = S1
                                 cinquina(3) = S2
                                 cinquina(4) = S7
                                 cinquina(5) = S8
                                 'End If
                                 ImpostaGiocata 1,ambata1,ruota,posta,k
                                 Gioca es,1,,1
                                 Scrivi
                                 ImpostaGiocata 1,ambo1,ruote,poste,k
                                 ImpostaGiocata 2,ambo2,ruote,poste,k
                                 Gioca es,1,,1
                                 Scrivi
                                 Scrivi"-----------------------------"
                                 Scrivi
                                 ImpostaGiocata 1,ambo3,ruote,poste,k
                                 ImpostaGiocata 2,ambo4,ruote,poste,k
                                 Gioca es,1,,1
                                 Scrivi
                                 ImpostaGiocata 1,cinquina,ruote,poste,k
                                 Gioca es,1,,1
                                 Scrivi
                                 ImpostaGiocata 1,ambo5,ruote,poste,k
                                 ImpostaGiocata 2,ambo6,ruote,poste,k
                                 Gioca es,1,,1
                                 Scrivi
                                 ImpostaGiocata 1,ambo7,ruote,poste,k
                                 Gioca es,1,,1
                                 Scrivi
                              End If
                           End If
                        End If
                     Next
                  Next
               Next
            Next
         Next
      Next
   Next
End Sub

quadratura su ambo ripetuto
 
Codice:
Sub Main
   Dim T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12
   Dim A,B,C,D,X,Y
   Dim ambata1(2),ambata2(2),ambata3(2),calc(10),ruota(5),ruote(5),posta(1),poste(2)
   Dim ambo1(2),ambo2(2),ambo3(2),ambo4(2),ambo5(2),ambo6(2),ambo7(2),ambo8(2),ambo9(2)
   Dim cinquina(5)
   Dim rs,rv,rx,rk
   Dim r1,r2,r3,r4
   posta(1) = 1
   poste(2) = 1
   '
   'rk = InputBox("1numero")
   rs = InputBox("Quante estrazioni vuoi controllare?",,0)
   k = 9
   For es = EstrazioneFin - rs To EstrazioneFin
      AvanzamentoElab EstrazioneFin - rs,EstrazioneFin,es
      For r1 = 1 To 9
         For r2 = r1 + 1 To 10
            'If r2 = 11 Then r2 = 12
            For p1 = 1 To 4
               For p2 = p1 + 1 To 5
                  '
                  For rx = rk To rk
                     '
                     A = Estratto(es,r1,p1)
                     B = Estratto(es,r1,p2)
                     C = Estratto(es,r2,p1)
                     D = Estratto(es,r2,p2)
                     '
                     If Distanza(r1,r2) = 1 And Distanza(p1,p2) = 1 _
                        Or Distanza(r1,r2) = 2 And Distanza(p1,p2) = 2 _
                        Or Distanza(r1,r2) = 3 And Distanza(p1,p2) = 3 _
                        Or Distanza(r1,r2) = 4 And Distanza(p1,p2) = 4 Then
                        '
                        S1 = Fuori90(A + C)
                        S2 = Fuori90(B + D)
                        S3 = Differenza(S1,S2)
                        S4 = S3/2
                        If pari(S3) Then
                           '
                           ReDim MatriceCaselleDaEvid(4,1)
                           '
                           MatriceCaselleDaEvid(1,0) = r1
                           MatriceCaselleDaEvid(1,1) = p1
                           '
                           MatriceCaselleDaEvid(2,0) = r1
                           MatriceCaselleDaEvid(2,1) = p2
                           '
                           MatriceCaselleDaEvid(3,0) = r2
                           MatriceCaselleDaEvid(3,1) = p1
                           '
                           MatriceCaselleDaEvid(4,0) = r2
                           MatriceCaselleDaEvid(4,1) = p2
                           '
                           'Call DisegnaEstrazione(es,MatriceCaselleDaEvid)
                           '
                           ReDim MatriceLegami(4,3)
                           '
                           MatriceLegami(1,0) = r1
                           MatriceLegami(1,1) = p1
                           MatriceLegami(1,2) = r1
                           MatriceLegami(1,3) = p2
                           '
                           If r2 = 12 Then MatriceLegami(2,0) = r2 - 1 Else MatriceLegami(2,0) = r2
                           MatriceLegami(2,1) = p1
                           If r2 = 12 Then MatriceLegami(2,2) = r2 - 1 Else MatriceLegami(2,2) = r2
                           MatriceLegami(2,3) = p2
                           '
                           MatriceLegami(3,0) = r1
                           MatriceLegami(3,1) = p1
                           If r2 = 12 Then MatriceLegami(3,2) = r2 - 1 Else MatriceLegami(3,2) = r2
                           MatriceLegami(3,3) = p1
                           '
                           MatriceLegami(4,0) = r1
                           MatriceLegami(4,1) = p2
                           If r2 = 12 Then MatriceLegami(4,2) = r2 - 1 Else MatriceLegami(4,2) = r2
                           MatriceLegami(4,3) = p2
                           '
                           Call DisegnaEstrazione(ES,MatriceCaselleDaEvid,MatriceLegami)
                           '
                           T1 = Array(T1,"So1","So2","Diff","  ","So3","So4","Diff","1Ambo",A,B)
                           Call InitTabella(T1)
                           Call SetColoreCella(1,RGB(255,255,255),RGB(0,0,0))
                           Call SetColoreCella(2,RGB(255,255,255),RGB(0,0,0))
                           Call SetColoreCella(3,RGB(255,255,255),RGB(0,0,0))
                           Call SetColoreCella(4,RGB(255,255,255),RGB(0,0,0))
                           Call SetColoreCella(5,RGB(255,255,255),RGB(0,0,0))
                           Call SetColoreCella(6,RGB(255,255,255),RGB(0,0,0))
                           Call SetColoreCella(7,RGB(255,255,255),RGB(0,0,0))
                           Call SetColoreCella(8,RGB(255,255,255),RGB(0,0,0))
                           Call SetColoreCella(9,RGB(255,255,255),RGB(0,0,0))
                           '-------------------------------
                           '
                           '------------------------------------------------
                           T2 = Array(T2,"  ","  ","  ","  ","  ","  ","  ","2Ambo",C,D)
                           Call AddRigaTabella(T2)
                           Call SetColoreCella(1,RGB(255,255,255),RGB(0,0,0))
                           Call SetColoreCella(2,RGB(255,255,255),RGB(0,0,0))
                           Call SetColoreCella(3,RGB(255,255,255),RGB(0,0,0))
                           Call SetColoreCella(4,RGB(255,255,255),RGB(0,0,0))
                           Call SetColoreCella(5,RGB(255,255,255),RGB(0,0,0))
                           Call SetColoreCella(6,RGB(255,255,255),RGB(0,0,0))
                           Call SetColoreCella(7,RGB(255,255,255),RGB(0,0,0))
                           Call SetColoreCella(8,RGB(255,255,255),RGB(0,0,0))
                           Call SetColoreCella(9,RGB(255,255,255),RGB(0,0,0))
                           '-------------------------------
                           S1 = Fuori90(A + C)
                           S2 = Fuori90(B + D)
                           S3 = Differenza(S1,S2)
                           '-------------------------------
                           '-------------------------------
                           If S1 > S2 Then S1 = S1 & "-" Else S2 = S2 & "-"
                           If S2 < S1 Then S2 = S2 & "+" Else S1 = S1 & "+"
                           '-------------------------------
                           A = A & "+" : B = B & "+"
                           '-----------------------------------------------
                           T3 = Array(T3,A,B," ","  ",S1,S2," ","  ","  ","  ")
                           Call AddRigaTabella(T3)
                           Call SetColoreCella(1,RGB(255,255,255),RGB(0,0,0))
                           Call SetColoreCella(2,RGB(255,255,255),RGB(0,0,0))
                           Call SetColoreCella(3,RGB(255,255,255),RGB(0,0,0))
                           Call SetColoreCella(4,RGB(255,255,255),RGB(0,0,0))
                           Call SetColoreCella(5,RGB(255,255,255),RGB(0,0,0))
                           Call SetColoreCella(6,RGB(255,255,255),RGB(0,0,0))
                           Call SetColoreCella(7,RGB(255,255,255),RGB(0,0,0))
                           Call SetColoreCella(8,RGB(255,255,255),RGB(0,0,0))
                           Call SetColoreCella(9,RGB(255,255,255),RGB(0,0,0))
                           '-------------------------------
                           '
                           '-------------------------------
                           T4 = Array(T4,C,D," ","  ",S4,S4," ","  ","  ","  ")
                           Call AddRigaTabella(T4)
                           Call SetColoreCella(1,RGB(255,255,255),RGB(0,0,0))
                           Call SetColoreCella(2,RGB(255,255,255),RGB(0,0,0))
                           Call SetColoreCella(3,RGB(255,255,255),RGB(0,0,0))
                           Call SetColoreCella(4,RGB(255,255,255),RGB(0,0,0))
                           Call SetColoreCella(5,RGB(255,255,255),RGB(0,0,0))
                           Call SetColoreCella(6,RGB(255,255,255),RGB(0,0,0))
                           Call SetColoreCella(7,RGB(255,255,255),RGB(0,0,0))
                           Call SetColoreCella(8,RGB(255,255,255),RGB(0,0,0))
                           Call SetColoreCella(9,RGB(255,255,255),RGB(0,0,0))
                           '-------------------------------
                           '
                           '-------------------------------
                           T5 = Array(T5,"  ","  ","  ","  ","  ","  ","  ","  ","  ","  ")
                           Call AddRigaTabella(T5)
                           Call SetColoreCella(1,RGB(255,255,255),RGB(0,0,0))
                           Call SetColoreCella(2,RGB(255,255,255),RGB(0,0,0))
                           Call SetColoreCella(3,RGB(255,255,255),RGB(0,0,0))
                           Call SetColoreCella(4,RGB(255,255,255),RGB(0,0,0))
                           Call SetColoreCella(5,RGB(255,255,255),RGB(0,0,0))
                           Call SetColoreCella(6,RGB(255,255,255),RGB(0,0,0))
                           Call SetColoreCella(7,RGB(255,255,255),RGB(0,0,0))
                           Call SetColoreCella(8,RGB(255,255,255),RGB(0,0,0))
                           Call SetColoreCella(9,RGB(255,255,255),RGB(0,0,0))
                           '-------------------------------
                           S1 = Fuori90(A + C)
                           S2 = Fuori90(B + D)
                           S3 = Differenza(S1,S2)
                           S4 = S3/2
                           If S1 > S2 Then S5 = Fuori90(S1 - S4) Else S5 = Fuori90(S1 + S4)
                           If S2 < S1 Then S6 = Fuori90(S2 + S4) Else S6 = Fuori90(S2 - S4)
                           '
                           S9 = 0
                           '
                           '-------------------------------
                           T6 = Array(T6,Format2(S1),Format2(S2),Format2(S3),"  ",S5,S6,S9,"Figura",Figura(A),Figura(B))
                           Call AddRigaTabella(T6)
                           Call SetColoreCella(1,RGB(26,217,136),RGB(0,0,0))
                           Call SetColoreCella(2,RGB(26,217,136),RGB(0,0,0))
                           Call SetColoreCella(3,RGB(255,187,9),RGB(0,0,0))
                           Call SetColoreCella(4,RGB(255,255,255),RGB(0,0,0))
                           Call SetColoreCella(5,RGB(223,249,3),RGB(0,0,0))
                           Call SetColoreCella(6,RGB(223,249,3),RGB(0,0,0))
                           Call SetColoreCella(7,RGB(223,249,3),RGB(0,0,0))
                           Call SetColoreCella(8,RGB(255,255,255),RGB(0,0,0))
                           Call SetColoreCella(9,RGB(255,255,255),RGB(0,0,0))
                           '-------------------------------
                           '
                           '-------------------------------
                           T7 = Array(T7,"  ","  ","  ","  ","  ","  ","  ","Figura",Figura(C),Figura(D))
                           Call AddRigaTabella(T7)
                           Call SetColoreCella(1,RGB(255,255,255),RGB(0,0,0))
                           Call SetColoreCella(2,RGB(255,255,255),RGB(0,0,0))
                           Call SetColoreCella(3,RGB(255,255,255),RGB(0,0,0))
                           Call SetColoreCella(4,RGB(255,255,255),RGB(0,0,0))
                           Call SetColoreCella(5,RGB(255,255,255),RGB(0,0,0))
                           Call SetColoreCella(6,RGB(255,255,255),RGB(0,0,0))
                           Call SetColoreCella(7,RGB(255,255,255),RGB(0,0,0))
                           Call SetColoreCella(8,RGB(255,255,255),RGB(0,0,0))
                           Call SetColoreCella(9,RGB(255,255,255),RGB(0,0,0))
                           '-------------------------------
                           S1 = Fuori90(A + C)
                           S2 = Fuori90(B + D)
                           S3 = Differenza(S1,S2)
                           '-------------------------------
                           '-------------------------------
                           If S1 > S2 Then S1 = S1 & "+" Else S2 = S2 & "+"
                           If S2 < S1 Then S2 = S2 & "-" Else S1 = S1 & "-"
                           '-------------------------------
                           '-------------------------------
                           T8 = Array(T8,"  ","  ","  ","  ",S1,S2,"  ","  ","  ","  ")
                           Call AddRigaTabella(T8)
                           Call SetColoreCella(1,RGB(255,255,255),RGB(0,0,0))
                           Call SetColoreCella(2,RGB(255,255,255),RGB(0,0,0))
                           Call SetColoreCella(3,RGB(255,255,255),RGB(0,0,0))
                           Call SetColoreCella(4,RGB(255,255,255),RGB(0,0,0))
                           Call SetColoreCella(5,RGB(255,255,255),RGB(0,0,0))
                           Call SetColoreCella(6,RGB(255,255,255),RGB(0,0,0))
                           Call SetColoreCella(7,RGB(255,255,255),RGB(0,0,0))
                           Call SetColoreCella(8,RGB(255,255,255),RGB(0,0,0))
                           Call SetColoreCella(9,RGB(255,255,255),RGB(0,0,0))
                           '-------------------------------
                           S1 = Fuori90(A + C)
                           S2 = Fuori90(B + D)
                           S3 = Differenza(S1,S2)
                           S4 = S3/2
                           If pari(S3) Then
                              '-------------------------------
                              T9 = Array(T9,"  ","  ","  ","  ",S4,S4,"  ","  ","  ","  ")
                              Call AddRigaTabella(T9)
                              Call SetColoreCella(1,RGB(255,255,255),RGB(0,0,0))
                              Call SetColoreCella(2,RGB(255,255,255),RGB(0,0,0))
                              Call SetColoreCella(3,RGB(255,255,255),RGB(0,0,0))
                              Call SetColoreCella(4,RGB(255,255,255),RGB(0,0,0))
                              Call SetColoreCella(5,RGB(255,255,255),RGB(0,0,0))
                              Call SetColoreCella(6,RGB(255,255,255),RGB(0,0,0))
                              Call SetColoreCella(7,RGB(255,255,255),RGB(0,0,0))
                              Call SetColoreCella(8,RGB(255,255,255),RGB(0,0,0))
                              Call SetColoreCella(9,RGB(255,255,255),RGB(0,0,0))
                              '-------------------------------
                              '-------------------------------
                              '-------------------------------
                              T10 = Array(T10,"  ","  ","  ","  ","  ","  ","  ","  ","  ","  ")
                              Call AddRigaTabella(T10)
                              Call SetColoreCella(1,RGB(255,255,255),RGB(0,0,0))
                              Call SetColoreCella(2,RGB(255,255,255),RGB(0,0,0))
                              Call SetColoreCella(3,RGB(255,255,255),RGB(0,0,0))
                              Call SetColoreCella(4,RGB(255,255,255),RGB(0,0,0))
                              Call SetColoreCella(5,RGB(255,255,255),RGB(0,0,0))
                              Call SetColoreCella(6,RGB(255,255,255),RGB(0,0,0))
                              Call SetColoreCella(7,RGB(255,255,255),RGB(0,0,0))
                              Call SetColoreCella(8,RGB(255,255,255),RGB(0,0,0))
                              Call SetColoreCella(9,RGB(255,255,255),RGB(0,0,0))
                              '-------------------------------
                              S1 = Fuori90(A + C)
                              S2 = Fuori90(B + D)
                              S3 = Differenza(S1,S2)
                              S4 = S3/2
                              If S1 > S2 Then S7 = Fuori90(S1 + S4) Else S7 = Fuori90(S1 - S4)
                              If S2 < S1 Then S8 = Fuori90(S2 - S4) Else S8 = Fuori90(S2 + S4)
                              '
                              '-------------------------------
                              T11 = Array(T11,"  ","  ","  ","  ",S7,S8,"  ","  ","  ","  ")
                              Call AddRigaTabella(T11)
                              Call SetColoreCella(1,RGB(255,255,255),RGB(0,0,0))
                              Call SetColoreCella(2,RGB(255,255,255),RGB(0,0,0))
                              Call SetColoreCella(3,RGB(255,255,255),RGB(0,0,0))
                              Call SetColoreCella(4,RGB(255,255,255),RGB(0,0,0))
                              Call SetColoreCella(5,RGB(26,217,136),RGB(0,0,0))
                              Call SetColoreCella(6,RGB(26,217,136),RGB(0,0,0))
                              Call SetColoreCella(7,RGB(26,217,136),RGB(0,0,0))
                              Call SetColoreCella(8,RGB(255,255,255),RGB(0,0,0))
                              Call SetColoreCella(9,RGB(255,255,255),RGB(0,0,0))
                              '-------------------------------
                              '-------------------------------
                              T12 = Array(T12,"  ","  ","  ","  ","  ","  ","  ","  ","  ","  ")
                              Call AddRigaTabella(T12)
                              Call SetColoreCella(1,RGB(255,255,255),RGB(0,0,0))
                              Call SetColoreCella(2,RGB(255,255,255),RGB(0,0,0))
                              Call SetColoreCella(3,RGB(255,255,255),RGB(0,0,0))
                              Call SetColoreCella(4,RGB(255,255,255),RGB(0,0,0))
                              Call SetColoreCella(5,RGB(255,255,255),RGB(0,0,0))
                              Call SetColoreCella(6,RGB(255,255,255),RGB(0,0,0))
                              Call SetColoreCella(7,RGB(255,255,255),RGB(0,0,0))
                              Call SetColoreCella(8,RGB(255,255,255),RGB(0,0,0))
                              Call SetColoreCella(9,RGB(255,255,255),RGB(0,0,0))
                              '-------------------------------
                              '
                              'If rx = S5 Or rx = S1 Or rx = S2 Or rx = S7 Or rx = S8 Then
                                 '
                                 'If Figura(A) = Figura(C) And Figura(B) = Figura(D) Then
                                 '
                                 '-------------------------------
                                 Call SetTableWidth("21%")
                                 CreaTabella
                                 '------------------------------
                                 ruota(1) = r1
                                 ruota(2) = r2
                                 '-----------------------------
                                 ruote(1) = r1
                                 ruote(2) = r2
                                 ruote(3) = 11
                                 ruote(4) = 12
                                 '----------------------------
                                 ambata1(1) =(S5)
                                 '
                                 ambo1(1) = ambata1(1)
                                 ambo1(2) = S1
                                 '----------------
                                 ambo2(1) = ambata1(1)
                                 ambo2(2) = S2
                                 '----------------
                                 'If A = D And B = C Then
                                 ambo3(1) =(S5)
                                 ambo3(2) =(S7)
                                 ambo4(1) =(S5)
                                 ambo4(2) =(S8)
                                 '
                                 cinquina(1) = S5
                                 cinquina(2) = S1
                                 cinquina(3) = S2
                                 cinquina(4) = S7
                                 cinquina(5) = S8
                                 'End If
                                 ImpostaGiocata 1,ambata1,ruota,posta,k
                                 Gioca es,1,,1
                                 Scrivi
                                 ImpostaGiocata 1,ambo1,ruote,poste,k
                                 ImpostaGiocata 2,ambo2,ruote,poste,k
                                 Gioca es,1,,1
                                 Scrivi
                                 Scrivi"-----------------------------"
                                 Scrivi
                                 ImpostaGiocata 1,ambo3,ruote,poste,k
                                 ImpostaGiocata 2,ambo4,ruote,poste,k
                                 Gioca es,1,,1
                                 Scrivi
                                 ImpostaGiocata 1,cinquina,ruote,poste,k
                                 Gioca es,1,,1
                                 Scrivi
                              'End If
                           End If
                        End If
                     End If
                  Next
               Next
            Next
         Next
      Next
   Next
End Sub

quadrati /2x2/3x3/4x4/5x5/
qua ho fatto un altro tipo di calcolo sulla quadratura
 
Ultima modifica:
9094.png

9095.PNG

[BA] [.. .. .. 22 ..] C.5 Estratto 02390 [07/09/2024] [85.27.36.22.87]

questa e la condizione del 22 85 su BA
con le figure 8 e 5
 
Ultima modifica:
9096.png
minicruciverba su ruote unite

9097.PNG

[TT] [NA][.. .. 09 90 ..] C.5 Ambo 02390 [07/09/2024] [36.51.09.90.52]
 
Ultima modifica:
9098.png
minicruciverba su ruote unite

9099.PNG

[NZ] [.. 86 62 .. ..] C.1 Ambo 02390 [07/09/2024] [24.86.62.74.75]
 
Ultima modifica:

Ultima estrazione Lotto

  • Estrazione del lotto
    sabato 04 gennaio 2025
    Bari
    48
    55
    67
    87
    14
    Cagliari
    60
    78
    37
    36
    07
    Firenze
    04
    55
    45
    27
    42
    Genova
    46
    77
    47
    17
    33
    Milano
    17
    86
    14
    63
    55
    Napoli
    25
    71
    16
    48
    28
    Palermo
    65
    55
    31
    05
    25
    Roma
    80
    05
    74
    75
    28
    Torino
    28
    66
    20
    24
    87
    Venezia
    25
    29
    20
    70
    24
    Nazionale
    62
    71
    03
    28
    15
    Estrazione Simbolotto
    Bari
    42
    33
    18
    36
    32

Ultimi Messaggi

Indietro
Alto