Mal meine Variante, schnell mal zusammengeklöppelt. Der Beep kann noch raus, der zeigt an, wenn doppelte Zahlen ausgefiltert werden. Und sortiert ist das Ergebnis auch nicht.
Code
Randomize
Declare Zahl&, Schleife&, Feld&, Doppel&, Liste&[]
Print "Die Ziehung der Lottozahlen"
Whileloop 7
Schleife& = &Loop
Zahl& = 1 + Rnd(48)
Feld& = SizeOf(Liste&[])
IfNot Feld&
Liste&[0] = Zahl&
Else
Repeat
WhileLoop Feld&
Doppel& = 0
If Liste&[&Loop - 1] = Zahl&
Doppel& = 1
Zahl& = 1 + Rnd(48)
Beep
EndIf
EndWhile
Until Doppel& = 0
Liste&[Schleife& - 1] = Zahl&
EndIf
EndWhile
WhileLoop 6
Print Liste&[&loop - 1]
Sleep 200
EndWhile
Print "Zusatzzahl:", Liste&[6]
Waitinput
Alles anzeigen
Beim Sortieren beachten, Liste&[6] ist die Zusatzzahl!
Gruß Volkmar