Advertisement
MeehoweCK

Untitled

Nov 13th, 2020
512
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.33 KB | None | 0 0
  1. #include <iostream>
  2. #include <cstdlib>
  3. #include <ctime>
  4.  
  5. using namespace std;
  6.  
  7. int main()
  8. {
  9.     srand(time(nullptr));       // srand() sets input in our rand() function; we put the time here
  10.     int drawn_number = rand(); // rand() returns a random number from interval <1; 32767>
  11.     cout << drawn_number << endl;
  12.     return 0;
  13. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement