R
Roby
Guest
ciao danilo volevo piu' che un consilio, un aiutino questo listato che ho trovato nei forum ho modificato un po. Mi trova
il numero 90 e poi trova,tutti gli ambi somma 90,sortiti dopo 4 estrazioni sucessive nellla ruote oppure anche a tutte.
Volevo sapere come si fa a trovare solo gli ambi sortiti piu' frequentemente.Dove modificarlo e se non chiedo troppo
come sistemare il reso conto cioe',n. estrazione,ruota,numero
n.estrazione,ruota,ambi somma,n.sortite ambi somma. grazie in anticipo
Sub main()
Dim n,t,r,n1,n2,n3,pippo
n3=90
For n=EstrazioneFin -988 To EstrazioneFin
Messaggio DataEstrazione
If Posizione(n,10,n3)<>0 Then
For pippo=n+1 To n+6
t=1
'in questo caso si indica la somma 90 , ma puo' essere indicato un numero che si vuole
Do While RicercaAmbiSomma(90,pippo,t,r,n1,n2)=True
Scrivi "Estrazione: " & FormatSpace(DataEstrazione (pippo),15) & FormatSpace (NomeRuota (r),15) & " " & CStr(n1) & " " & CStr(n2) & " " & FormatSpace(DataEstrazione ,15) & FormatSpace (NomeRuota (r),15) & " " & CStr(n3)
t=t+1
Loop
Next
End If
Next
End Sub
Function RicercaAmbiSomma(somma,estrazione, tentativo, byref ruota, byref numero1, byref numero2)
Dim trovati,r,i,j
r= 10
For i= 1 To 4
For j=i+1 To 5
If Estratto (estrazione,r,i)+ Estratto(estrazione,r,j)=somma Then
trovati=trovati+1
If trovati=tentativo Then
numero1=Estratto(estrazione,r,i)
numero2=Estratto(estrazione,r,j)
ruota=r
RicercaAmbiSomma=True
Exit Function
End If
End If
Next
Next
RicercaAmbiSomma=False
End Function
ROBY
il numero 90 e poi trova,tutti gli ambi somma 90,sortiti dopo 4 estrazioni sucessive nellla ruote oppure anche a tutte.
Volevo sapere come si fa a trovare solo gli ambi sortiti piu' frequentemente.Dove modificarlo e se non chiedo troppo
come sistemare il reso conto cioe',n. estrazione,ruota,numero
n.estrazione,ruota,ambi somma,n.sortite ambi somma. grazie in anticipo
Sub main()
Dim n,t,r,n1,n2,n3,pippo
n3=90
For n=EstrazioneFin -988 To EstrazioneFin
Messaggio DataEstrazione
If Posizione(n,10,n3)<>0 Then
For pippo=n+1 To n+6
t=1
'in questo caso si indica la somma 90 , ma puo' essere indicato un numero che si vuole
Do While RicercaAmbiSomma(90,pippo,t,r,n1,n2)=True
Scrivi "Estrazione: " & FormatSpace(DataEstrazione (pippo),15) & FormatSpace (NomeRuota (r),15) & " " & CStr(n1) & " " & CStr(n2) & " " & FormatSpace(DataEstrazione ,15) & FormatSpace (NomeRuota (r),15) & " " & CStr(n3)
t=t+1
Loop
Next
End If
Next
End Sub
Function RicercaAmbiSomma(somma,estrazione, tentativo, byref ruota, byref numero1, byref numero2)
Dim trovati,r,i,j
r= 10
For i= 1 To 4
For j=i+1 To 5
If Estratto (estrazione,r,i)+ Estratto(estrazione,r,j)=somma Then
trovati=trovati+1
If trovati=tentativo Then
numero1=Estratto(estrazione,r,i)
numero2=Estratto(estrazione,r,j)
ruota=r
RicercaAmbiSomma=True
Exit Function
End If
End If
Next
Next
RicercaAmbiSomma=False
End Function
ROBY