Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <cstdlib>
- #include <ctime>
- using namespace std;
- int main()
- {
- srand(time(nullptr)); // srand() sets input in our rand() function; we put the time here
- int drawn_number = rand(); // rand() returns a random number from interval <1; 32767>
- cout << drawn_number << endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement