How can I generate a random number within range 0 to n where n can be > RAND_MAX in c,c++?
Thanks.
Assuming C++, have you tried looking at a decent random number library, like Boost.Random. Otherwise you may have to combine multiple random numbers.