fork download
  1. // Online C++ compiler to run C++ program online
  2. #include <iostream>
  3. #include <random>
  4. #include <ctime>
  5.  
  6. using namespace std;
  7.  
  8. void mRand()
  9. {
  10. srand(time(0));
  11.  
  12. for(int i = 0; i < 7; i++)
  13. {
  14. i = rand();
  15. cout << i << endl;
  16. }
  17.  
  18.  
  19. }
  20.  
  21.  
  22. int main()
  23. {
  24. // Write C++ code here
  25. mRand();
  26.  
  27. return 0;
  28. }
Success #stdin #stdout 0.01s 5288KB
stdin
Standard input is empty
stdout
1882739363