Novità

Radicali

korokoro

Super member
Ciao a tutti , come posso fare per giocare la quartina radicale di questo script :
-----------------------------------------------------------------------------------------------------------------------------------

Sub main()
Dim nc(4),nr(3),num(1)
nes = InputBox("Quante estrazioni vuoi controllare?","Estrazioni",10)
id = InputBox("Quante estrazioni vuoi iniziare?","Estrazioni-",0)
ini = EstrazioneFin - nes
fin = EstrazioneFin - id
For es=ini To fin
Messaggio "Estrazione: " & es

For r1=1 To 12
If r1=11 Then r1=12
For p1 = 1 To 4
For p2=p1+1 To 5
a = Estratto (es,r1,p1)
b = Estratto (es,r1,p2)
If Radicale(a) And Radicale(b) And Radicale(a)=Radicale(b) Then
For r2=1 To 12
If r2=11 Then r2=12
If r1<>r2 Then
For p3=1 To 5
c = Estratto (es,r2,p3)
If (Radicale(c) And Radicale(a)=Radicale(c) Or Radicale(b)=Radicale(c)) Then
If a<>c And b<>c Then
nr(1)=a:nr(2)=b:nr(3)=c
rd=Radicale (a)
nc(1)=rd:nc(2)=CInt (rd&"0"):nc(3)= CInt(rd&rd):nc(4)=CInt (rd&9)
'Trova il radicale mancante
For j=1 To 4
h=0
For i=1 To 3
If nc(j)<>nr(i) Then h=h+1
Next
If h=3 Then num(1)=nc(j) : Exit For
Next
casi=casi+1:Scrivi String(75,"=")
Scrivi DataEstrazione(es,1)&" [ "&SiglaRuota(r1)&" - "&StringaEstratti(es,r1)&" ] [ "&_
Format2(a)&"."&format2(b)&" ] in "&(p1)&"^/"&(p2)&"^ pos."
Scrivi DataEstrazione(es,1)&" [ "&SiglaRuota(r2)&" - "&StringaEstratti(es,r2)&" ] [ "&_
Format2(c)&" ] in "&(p3)&"^ pos."
Scrivi "Nume. manc. ("& Format2 (num(1))&")",1
Scrivi
Scrivi "Numeri "& Format2 (a)&"."& Format2 (b)&"."& Format2 (c)&"."& Format2 (num(1))&"",1
Scrivi String(60,"-")&" caso n° "&(casi)
End If
End If
Next
End If
Next
End If
Next:Next:Next
Next
End Sub

-----------------------------------------------------------------------------------------------------------------------------------------------------------

Grazie Leo
 

joe

Advanced Member >PLATINUM PLUS<
Ciao Leo.

Lo script è un pò arzigogolato, dunque non si capisce bene se esso

sia effettivamente complicato a seguito della descrizione "di un metodo complicato"

oppure dalla ridondanza di condizioni ripetute ed eseguite reiteratamente.

Non potendo ... "decidere io" cosa semplificare oppure no, mi sono limitato,

ad inserire alcune delle cose che hai richiesto.

Codice:
Sub Main()
	Dim nc(4),nm
	Dim Nr(4),Ru(2),Po(2) : Po(2) = 2 : Co = 9
	nes = InputBox("Quante estrazioni vuoi controllare?","Estrazioni",10)
	'id = InputBox("Quante estrazioni vuoi iniziare?","Estrazioni-",0)
	ini = EstrazioneFin - nes
	fin = EstrazioneFin '- id
	For es = ini To fin
		Messaggio "Estrazione: " & es
		For r1 = 1 To 10
			If r1 = 11 Then r1 = 12
			For p1 = 1 To 4
				For p2 = p1 + 1 To 5
					a = Estratto(es,r1,p1)
					b = Estratto(es,r1,p2)
					If Radicale(a) And Radicale(b) And Radicale(a) = Radicale(b) Then
						For r2 = 1 To 12
							If r2 = 11 Then r2 = 12
							If r1 <> r2 Then
								For p3 = 1 To 5
									c = Estratto(es,r2,p3)
									If(Radicale(c) And Radicale(a) = Radicale(c) Or Radicale(b) = Radicale(c)) Then
										If a <> c And b <> c Then
											Nr(1) = a:Nr(2) = b:Nr(3) = c
											Ru(1) = R1 : Ru(2) = R2
											rd = Radicale(a)
											nc(1) = rd:nc(2) = CInt(rd & "0"):nc(3) = CInt(rd & rd):nc(4) = CInt(rd & 9)
											'Trova il radicale mancante
											For j = 1 To 4
												h = 0
												For i = 1 To 3
													If nc(j) <> Nr(i) Then h = h + 1
												Next
												If h = 3 Then nm = nc(j) : Exit For
											Next
											casi = casi + 1
											Scrivi String(106,"=") & FormatSpace(casi,3,True),True
											Scrivi DataEstrazione(es,1) & " [ " & SiglaRuota(r1) & " - " & StringaEstratti(es,r1) & " ] [ " & _
											Format2(a) & "." & Format2(b) & " ] in " &(p1) & "^/" &(p2) & "^ pos."
											Scrivi DataEstrazione(es,1) & " [ " & SiglaRuota(r2) & " - " & StringaEstratti(es,r2) & " ] [ " & _
											Format2(c) & String(3,".") & " ] in " &(p3) & "^ pos."
											Scrivi "Nume. manc. (" & Format2(nm) & ")",1
											Scrivi
											Scrivi "Numeri " & Format2(a) & "." & Format2(b) & "." & Format2(c) & "." & Format2(nm) & "",1
											Nr(4) = nm
											ImpostaGiocata 1,Nr,Ru,Po,Co,2
											Gioca Es,True
										End If
									End If
								Next
							End If
						Next
					End If
				Next
			Next
		Next
	Next
	ScriviResoconto
End Sub

:)
 

Ultima estrazione Lotto

  • Estrazione del lotto
    venerdì 19 aprile 2024
    Bari
    39
    05
    81
    89
    73
    Cagliari
    56
    21
    01
    90
    03
    Firenze
    05
    56
    68
    27
    09
    Genova
    42
    50
    90
    27
    83
    Milano
    16
    71
    29
    85
    04
    Napoli
    29
    19
    23
    63
    50
    Palermo
    35
    54
    33
    57
    61
    Roma
    17
    29
    43
    55
    74
    Torino
    69
    60
    03
    01
    26
    Venezia
    05
    57
    59
    43
    34
    Nazionale
    30
    43
    64
    65
    21
    Estrazione Simbolotto
    Genova
    02
    20
    25
    12
    19

Ultimi Messaggi

Alto