[Solved] Creating a function to generate a random number [closed]
[ad_1] As it has been answered in Adam Rosenfield’s solution a while ago you may try to use an algoritm similar to this one below: int i; do { i = 5 * (rand5() – 1) + rand5(); // i is now uniformly random between 1 and 25 } while(i > 21); // i is … Read more