SyntaxFix
Write A Post
Hire A Developer
Questions
The formula for this is very simple, so try this expression,
int num = (int) rand() % (max - min) + min; //Where rand() returns a random number between 0.0 and 1.0