how can i write C code that generate random number without using built in code

A

Alexander Malkis

Sweety said:
plz reply,
thanks in advance.
bye
You cannot generate truly random numbers (without an external device) in
the mathematical sense of the word. You can only generate pseudorandom
numbers. For the discussion, google the topics "alternative rand()", etc.

My favourie, although very slow method for generating a sequence of
pseudorandoms in the interval [0,1] is

next_number := after_comma_part_of ((Pi+previous_number)^5)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,432
Messages
2,571,680
Members
48,796
Latest member
Greg L.

Latest Threads

Top