Trax^
Legacy Member
Code:
Dim lotto(11, 5) As Integer
Dim i, j, k As Integer
Dim strLotto As String
strLotto = ""
Randomize()
For i = 0 To 11
lotto(i, 0) = Int(Rnd() * 42 + 1)
For j = 1 To 5
lotto(i, j) = Int(Rnd() * 42 + 1)
'test op dubbels
[B] For k = 0 To j - 1
If lotto(i, k) = lotto(i, j) Then
j -= 1
End If
Next[/B]
Next
Next
For i = 0 To 11
For j = 0 To 5
strLotto &= lotto(i, j).ToString & Space(3)
Next
strLotto &= vbNewLine
Next
txtLotto.Text = strLotto
End Sub
Dees is men die ne quick pick genereert. Nu moet ik ook zien da em controleert op dubbels. er moge geen dubbel getalle voorkome. ma da werkt nie. wa moet ik aanpasse?