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 vaues

Hi all

how do load vars with random values ?

for example I need 3 random integers from 1 to 10 1 in each in each var .

What is the C code for declaring 3 integer variables loaded with a random integer for 1 to 10 each ?

Thanks
Elico

Parents
  • ... and use it to make decisions in the C code

    And it's OK if those decisions will be the same for each program run? If so, save yourself the trouble and use the numbers 7, 2 and 8. Because using header files like stdlib.h and functions like srand(), rand() won't be any better. Seriously.

Reply
  • ... and use it to make decisions in the C code

    And it's OK if those decisions will be the same for each program run? If so, save yourself the trouble and use the numbers 7, 2 and 8. Because using header files like stdlib.h and functions like srand(), rand() won't be any better. Seriously.

Children