Hi all. I want to make my program to generate a random number and then add that number to a variable. Could you show me how it's done if I want my number to be between, lets say 0 and 50? Thanks.
long int 'what ever you want' = 0; long int 'what you wanted' = rand() % (10000 * 1);
i am trying to program a guessing game that generates a different random number every time i run it, right now it always generates the same number so there is no point of this program :D