fork(2) download
  1. #include <iostream>
  2. #include <random>
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7. default_random_engine engine( 100 );
  8. uniform_int_distribution< int > distribution( 0, 10 );
  9.  
  10. for( int i = 0; i < 10; ++i )
  11. {
  12. cout << distribution( engine ) << endl;
  13. }
  14.  
  15. return 0;
  16. }
Success #stdin #stdout 0s 3296KB
stdin
Standard input is empty
stdout
0
1
6
9
3
9
7
9
10
5