HTML
Sub Main()
Dim n(5)
Dim EE(5)
Dim RR(5)
Dim tmpr(1)
Dim d(5)
Dim a1(11),a2(11),a3(11),a4(11),a5(11)
Dim RU(1)
r = 1
RU(1) = r
Fin = EstrazioneFin
ini = Fin - 27
For es = ini To EstrazioneFin
ColoreTesto 0
Scrivi DataEstrazione(es) & Space(6),0,0
z = z - 1
For pr = 1 To 55 '
h = NPR(es - 1,r,pr)
If h < 12 Then
x1 = x1 + 1
a1(x1) = h
End If
If h > 11 And h < 23 Then
x2 = x2 + 1
a2(x2) = h
End If
If h > 22 And h < 34 Then
x3 = x3 + 1
a3(x3) = h
End If
If h > 33 And h < 45 Then
x4 = x4 + 1
a4(x4) = h
End If
If h > 44 Then
x5 = x5 + 1
a5(x5) = h
End If
Next
x1 = 0
x2 = 0
x3 = 0
x4 = 0
x5 = 0
For p = 1 To 5
e = Estratto(es,r,p)
If a1(1) = e Then d(p) = 1
If a1(2) = e Then d(p) = 2
If a1(3) = e Then d(p) = 3
If a1(4) = e Then d(p) = 4
If a1(5) = e Then d(p) = 5
If a1(6) = e Then d(p) = 6
If a1(7) = e Then d(p) = 7
If a1(8) = e Then d(p) = 8
If a1(9) = e Then d(p) = 9
If a1(10) = e Then d(p) = 10
If a1(11) = e Then d(p) = 11
If a2(1) = e Then d(p) = 12
If a2(2) = e Then d(p) = 13
If a2(3) = e Then d(p) = 14
If a2(4) = e Then d(p) = 15
If a2(5) = e Then d(p) = 16
If a2(6) = e Then d(p) = 17
If a2(7) = e Then d(p) = 18
If a2(8) = e Then d(p) = 19
If a2(9) = e Then d(p) = 20
If a2(10) = e Then d(p) = 21
If a2(11) = e Then d(p) = 22
If a3(1) = e Then d(p) = 23
If a3(2) = e Then d(p) = 24
If a3(3) = e Then d(p) = 25
If a3(4) = e Then d(p) = 26
If a3(5) = e Then d(p) = 27
If a3(6) = e Then d(p) = 28
If a3(7) = e Then d(p) = 29
If a3(8) = e Then d(p) = 30
If a3(9) = e Then d(p) = 31
If a3(10) = e Then d(p) = 32
If a3(11) = e Then d(p) = 33
If a4(1) = e Then d(p) = 34
If a4(2) = e Then d(p) = 35
If a4(3) = e Then d(p) = 36
If a4(4) = e Then d(p) = 37
If a4(5) = e Then d(p) = 38
If a4(6) = e Then d(p) = 39
If a4(7) = e Then d(p) = 40
If a4(8) = e Then d(p) = 41
If a4(9) = e Then d(p) = 42
If a4(10) = e Then d(p) = 43
If a4(11) = e Then d(p) = 44
If a5(1) = e Then d(p) = 45
If a5(2) = e Then d(p) = 46
If a5(3) = e Then d(p) = 47
If a5(4) = e Then d(p) = 48
If a5(5) = e Then d(p) = 49
If a5(6) = e Then d(p) = 50
If a5(7) = e Then d(p) = 51
If a5(8) = e Then d(p) = 52
If a5(9) = e Then d(p) = 53
If a5(10) = e Then d(p) = 54
If a5(11) = e Then d(p) = 55
Next
For f = 1 To 55
ColoreTesto 5
If f = d(1) Or f = d(2) Or f = d(3) Or f = d(4) Or f = d(5) Then ColoreTesto 2
g = f Mod 11
If g = 0 Then g = 11
Scrivi Format2(g),0,0
If g = 11 Then Scrivi " ",0,0
If f = 55 Then Scrivi""
Next
For p = 1 To 55
h = NPR(fin,r,p)
If h < 12 Then
x1 = x1 + 1
a1(x1) = h
End If
If h > 11 And h < 23 Then
x2 = x2 + 1
a2(x2) = h
End If
If h > 22 And h < 34 Then
x3 = x3 + 1
a3(x3) = h
End If
If h > 33 And h < 45 Then
x4 = x4 + 1
a4(x4) = h
End If
If h > 44 Then
x5 = x5 + 1
a5(x5) = h
End If
Next
x1 = 0
x2 = 0
x3 = 0
x4 = 0
x5 = 0
Next
ColoreTesto 0
Scrivi "conversione > ",1,0
For K = 1 To 11
ColoreTesto 0
If pari(k) = False Then ColoreTesto 2
Scrivi Format2(a1(K)),1,0
If K = 11 Then Scrivi" ",0,0
Next
For K = 1 To 11
ColoreTesto 0
If pari(k) = False Then ColoreTesto 1
Scrivi Format2(a2(K)),1,0
If K = 11 Then Scrivi" ",0,0
Next
For K = 1 To 11
ColoreTesto 0
If pari(k) = False Then ColoreTesto 2
Scrivi Format2(a3(K)),1,0
If K = 11 Then Scrivi" ",0,0
Next
For K = 1 To 11
ColoreTesto 0
If pari(k) = False Then ColoreTesto 1
Scrivi Format2(a4(K)),1,0
If K = 11 Then Scrivi" ",0,0
Next
For K = 1 To 11
ColoreTesto 0
If pari(k) = False Then ColoreTesto 2
Scrivi Format2(a5(K)),1,0
If K = 11 Then Scrivi" ",0,1
ColoreTesto 0
Next
Scrivi
End Sub
Function NPR(e,r,p)
ru = r : co = 56 :c = 0 : ReDim vett(0)
Do While co > 1
For es = e To fin - 200 Step - 1
For q = 5 To 1 Step - 1
x = 0
For i = 0 To c
If Estratto(es,ru,q) = vett(i) Then x = x + 1
Next
If x = 0 Then
co = co - 1
c = c + 1
ReDim Preserve vett(c)
vett(c) = Estratto(es,ru,q)
If co = p Then
NPR = Estratto(es,ru,q)
Exit Do
End If
End If
Next
Next
Loop
End Function