fork(1) download
  1. #include <iostream>
  2. #include <cstdlib>
  3. #include <ctime>
  4.  
  5. int main()
  6. {
  7. int x[100];
  8. for(int i = 0; i < 100; ++i) {
  9. std::srand(std::time(0));
  10. x[i] = std::rand() % 100;
  11. }
  12. for(int i: x)
  13. std::cout << i << ' ';
  14. }
  15.  
  16.  
Success #stdin #stdout 0s 2852KB
stdin
Standard input is empty
stdout
61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61