fork download
  1. #include <iostream>
  2. #include <ctime>
  3.  
  4. int main() {
  5. srand(static_cast<unsigned int>(time(nullptr)));
  6.  
  7. for (int i = 0; i < 10; ++i)
  8. {
  9. std::cout << (rand() | (rand() << 8)) << std::endl;
  10. }
  11. }
Success #stdin #stdout 0s 15232KB
stdin
Standard input is empty
stdout
1063608218
-1481638357
-135594279
-1094781152
-159401002
-556729653
-536891478
2130698111
1441595097
681536578