fork(1) download
  1. #include <iostream>
  2. #include <cstdio>
  3. #include <vector>
  4. #include <fstream>
  5. using namespace std;
  6.  
  7. int main(){
  8. int np;
  9. string temp;
  10.  
  11. scanf("%d", &np);
  12. vector <int> money;
  13. vector <string> names;
  14. cin.ignore();
  15. for(int i = 0; i< np; i++){
  16. getline(cin, temp);
  17. names.push_back(temp);
  18. cout << names[i] << endl;
  19. }
  20.  
  21. return 0;
  22. }
Success #stdin #stdout 0s 2824KB
stdin
5
Hello
How
are 
you
?
stdout
Hello
How
are 
you
?