sir i need c code to generate random numbers between 1 to 100 and where the user can select the range(say 50 random numbers between 1 to 100 or 20 random numbers from 1 to 100 ) such that generated random sequence are not psuedo random numbers when it is run for different times and also in the generated random numbers no number should be repeated even if the program is run several times.

Recommended Answers

All 2 Replies

If a number can't be repeated, then it's not random or pseudo random - just to be clear.

If a number can't be repeated, even during several runs of the program, then clearly you need a data file to be read to tell the program what numbers either can or can not, be used at that time.

This is not a C code "request" forum. We help you overcome problems with programs you are working on.

Be a part of the DaniWeb community

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