hi all,

I am required to generate an array having 100 random numbers, where there is absolutely no repetition and the case where the ith element of the array is the number " i " itself is not allowed ..

I found some ideas where we could generate pseudo random numbers using the idea:

x(n+1) = (x(n)*P1 + P2) (mod N) .

where x(n) is the nth element,

P1 and P2 are constants

N is also a constant.. the value of x0 must be chosen appropriately..

This does not guarantee absolute randomness..

Can some one help me with this please...

iamthwee
1,547

Exodust
0

kris.c
0

kris.c
0

Rashakil Fol
978

Narue
5,707

Exodust
0

Narue
5,707

Exodust
0

Narue
5,707

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.18 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.