Dim I
Dim A$[101]
Dim x$
Dim duplicate=false
Dim z$
Dim Y
Dim N
Print "Selecting 6 unique random numbers ..."
Print
N=1
while N<7
duplicate=false
Randomize
Y = ((Rnd * 49)+1)
z$=Str$(INT(Y))
for I = 1 to N
if A$[I]=z$ Then
duplicate = true
Exit for
end if
Next
if duplicate=false then
A$[N]=z$
Print A$[N]
N=N+1
end if
Wend
This code and the BCX Basic to C compiler was used to compile the random freeware executive. The BCX compiler is freeware and can be downloaded at:-