This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

random number

where can i get the code to make a random number. it must be for 7 digits between 0 and 7. it must be efficient comented romantic and in c.

Parents
  • Code, by definition, is deterministic - therefore it cannot possibly generate random numbers!

    The best you can do with software alone is a pseudo-random number generator, PRNG.

    I'm sure you can manage to put those keywords into Google?

    Specifically for finding source code, try http://codesearch.google.com

    Did you think to check what facilities might be available in the Standard 'C' Library...?

    "it must be ... romantic"

    Eh???

Reply
  • Code, by definition, is deterministic - therefore it cannot possibly generate random numbers!

    The best you can do with software alone is a pseudo-random number generator, PRNG.

    I'm sure you can manage to put those keywords into Google?

    Specifically for finding source code, try http://codesearch.google.com

    Did you think to check what facilities might be available in the Standard 'C' Library...?

    "it must be ... romantic"

    Eh???

Children