randome

This is a discussion on randome within the C++ Programming forums, part of the General Programming Boards category; is thar a way to just get a random number betwen 1-10 ? cuz stuff like this would help me ...

  1. #1
    Registered User
    Join Date
    Jun 2005
    Posts
    47

    randome

    is thar a way to just get a random number betwen 1-10 ?
    cuz stuff like this would help me alot

  2. #2
    Dae
    Dae is offline
    Deprecated Dae's Avatar
    Join Date
    Oct 2004
    Location
    Canada
    Posts
    1,034
    How do I... (Level 1) Generate random numbers?

    I personally use for rc =, this instead:

    Code:
    rc = (rand() / (RAND_MAX / (max - min) + 1) + min);
    Warning: Have doubt in anything I post.

    GCC 4.5, Boost 1.40, Code::Blocks 8.02, Ubuntu 9.10 010001000110000101100101

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 5
    Last Post: 05-04-2002, 12:31 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21