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
 
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
    martedì 01 luglio 2025
    Bari
    71
    66
    48
    42
    76
    Cagliari
    84
    70
    23
    69
    43
    Firenze
    50
    21
    30
    11
    69
    Genova
    89
    41
    50
    80
    67
    Milano
    41
    59
    67
    03
    60
    Napoli
    87
    63
    51
    42
    07
    Palermo
    56
    87
    76
    27
    09
    Roma
    41
    26
    50
    22
    77
    Torino
    36
    83
    80
    65
    05
    Venezia
    45
    77
    76
    81
    71
    Nazionale
    72
    06
    03
    08
    07
    Estrazione Simbolotto
    Nazionale
    34
    27
    08
    12
    17
Indietro
Alto