MeehoweCK

Untitled

Nov 21st, 2020
638
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <iostream>
  2. #include <ctime>
  3. #include <cstdlib>
  4.  
  5. using namespace std;
  6.  
  7. int losuj(int a, int b)
  8. {
  9.     srand(time(nullptr));
  10.     return a + rand() % (b - a + 1);
  11. }
  12.  
  13. int main()
  14. {
  15.     cout << losuj(1, 1000) << endl;
  16.     return 0;
  17. }
RAW Paste Data