fork(1) download
  1. #include <iostream>
  2. #include <random>
  3.  
  4. int main()
  5. {
  6. std::random_device rd;
  7. std::default_random_engine generator(rd());
  8.  
  9. std::uniform_int_distribution<int> distribution(10,1000000);
  10.  
  11. for (int i=0; i<10; ++i)
  12. {
  13. std::cout << distribution(generator) << " ";
  14. }
  15. std::cout << std::endl;
  16.  
  17. return 0;
  18. }
Success #stdin #stdout 0s 3428KB
stdin
Standard input is empty
stdout
217695 813367 28847 564452 444222 200930 118687 157163 691504 328575