fork(1) download
  1. #include <random>
  2. #include <iostream>
  3. using namespace std;
  4.  
  5. void DisplaySix(unsigned char iNumber)
  6. {
  7. unsigned int iDisplay;
  8. default_random_engine engine;
  9. uniform_int_distribution<int>distribution(1,6);
  10. do
  11. {
  12. iDisplay=distribution(engine);
  13. cout << iDisplay;
  14. cout << "\n";
  15. iNumber--;
  16. }
  17. while(iNumber>0);
  18. return;
  19. }
  20.  
  21. int main()
  22. {
  23. DisplaySix(10);
  24. }
Success #stdin #stdout 0s 2896KB
stdin
Standard input is empty
stdout
1
1
5
3
4
2
1
5
5
6