Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- include <ctime>
- #include <iostream>
- #include <cstdlib>
- using namespace std;
- int random(int MIN, int MAX){
- start:
- int randnum(0);
- srand(time(NULL));
- randnum = MIN + rand() % MAX; if (randnum > MAX){ goto start; }
- return randnum;
- }
Add Comment
Please, Sign In to add comment