fork download
  1. #include <iostream>
  2. #include <fstream>
  3. using namespace::std;
  4.  
  5. int main(){
  6. ofstream output("dos_rand_out.txt", ios::out);
  7. srand(1);
  8. for (int i=0; i<20; i++) {
  9. output << rand() << "\n";
  10. // cout << rand() << "\n";
  11. // cout << rand() << "\n";
  12. }
  13. output.close();
  14. }
  15.  
Success #stdin #stdout 0.01s 5524KB
stdin
Standard input is empty
stdout
Standard output is empty