Repeat this article is absolutely accidental chance, the year before last, and so on a new day's day, and his wife Street stroll, suddenly remembered to buy a welfare lottery ticket, the result
Fart is not in the first day of spring, wrote a forecast lottery winning program, which is a key algorithm is how to generate a repeat of the number,
Everyone after reading this program, if the jackpot, do not forget tofu AH:
Sub Calcapiao ()
Dim Strcaipiaonoarr () as String
Dim strSQL as String
Dim Strcaipiaono as String
Strcaipiaono = " 01,02,03,04,05,06,07,08,09,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33 "
Dim Strtemparr (7) as String
Dim Strzhongjiangarr (7) as String
Strcaipiaonoarr = Split (Strcaipiaono, ",")
Dim Intrand as Integer
Dim I as Integer
Dim J as Integer
i = 0
Dim Find as Boolean
Do While True
Find = False
Randomize
Intrand = Int ((Rnd) + 1)
For j = 0 to I-1
If Strtemparr (j) = CStr (Intrand) Then
Find = True
End If
Next
If not find Then
Strtemparr (j) = CStr (Intrand)
Strzhongjiangarr (i) = CStr (Intrand)
' Text1 (i) = Strzhongjiangarr (i)
i = i + 1
If i = 7 Then
Exit do
End If
End If
Loop
End Sub
Oh, after a few days, I put this program into components, put it on my site everyone to play together, hehe!
/*
Tofu production is a boutique
Http://www.asp888.net Tofu Technology Station
If reproduced please retain the full copyright information
*/