SHARE
TWEET

Untitled

a guest Jan 18th, 2019 51 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. int getNum()
  2. {
  3.     return rand() % 10;
  4. }
  5.  
  6. int main()
  7. {
  8.     srand(time(NULL));
  9.     for (int i = 0; i < 10; i++)
  10.     {
  11.         cout << getNum() << endl;
  12.     }
  13.     system("pause");
  14.     return 0;
  15. }
  16.    
  17. int getNum()
  18. {
  19.     srand(time(NULL));
  20.     return rand() % 10;
  21. }
  22.  
  23. int main()
  24. {
  25.     for (int i = 0; i < 10; i++)
  26.     {
  27.         cout << getNum() << endl;
  28.     }
  29.     system("pause");
  30.     return 0;
  31. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top