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
    martedì 23 aprile 2024
    Bari
    47
    22
    34
    20
    50
    Cagliari
    33
    14
    86
    02
    62
    Firenze
    61
    22
    44
    19
    26
    Genova
    21
    12
    57
    82
    55
    Milano
    66
    05
    11
    70
    30
    Napoli
    05
    23
    25
    52
    73
    Palermo
    23
    44
    49
    71
    65
    Roma
    82
    37
    59
    34
    71
    Torino
    26
    42
    66
    15
    58
    Venezia
    57
    06
    68
    54
    84
    Nazionale
    21
    79
    49
    03
    01
    Estrazione Simbolotto
    Genova
    24
    02
    19
    03
    27

Ultimi Messaggi

Alto