Advertisement
pan7nikt

rand

Dec 10th, 2019
277
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.19 KB | None | 0 0
  1. #include <time.h>
  2. #include <iostream>
  3. #include <cstdlib>
  4.  
  5. using namespace std;
  6.  
  7. int i;
  8.  
  9. main()
  10. {
  11.     srand(time (NULL));
  12.     for (i=0; i<30; i++)
  13.     {
  14.         cout << rand()%10 << endl;
  15.     }
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement