how can i generate random numbers
without duplicate values?
say i want o\p something like this
o\p--- 6,2,1,5,10,8,7,3,4,9
the o\p is random numbers from 1 to 10
without any duplicate values
i also want to know how can i "shuffle"
elements(objects ) of a Collection(Type)
type alien
field val
end type
for i = 1 to 100
a.alien = new alien
a\val = i
nxt
i want to shuffle the objects of this collection
so that i get a "shuffled o\p"
how can i do this ?
without duplicate values?
say i want o\p something like this
o\p--- 6,2,1,5,10,8,7,3,4,9
the o\p is random numbers from 1 to 10
without any duplicate values
i also want to know how can i "shuffle"
elements(objects ) of a Collection(Type)
type alien
field val
end type
for i = 1 to 100
a.alien = new alien
a\val = i
nxt
i want to shuffle the objects of this collection
so that i get a "shuffled o\p"
how can i do this ?