fork(1) download
  1. #include <iostream>
  2. #include <cstring>
  3. using namespace std;
  4.  
  5. const int MAX_LENGTH = 100;
  6.  
  7. int main() {
  8. char s1[MAX_LENGTH], s2[MAX_LENGTH], sHelp[MAX_LENGTH];
  9. s1[0] = 0;
  10. cin.getline(sHelp, MAX_LENGTH);
  11. strcat(s1, sHelp);
  12. //cout << s1 << endl;
  13. s2[0] = 0;
  14. cin.getline(sHelp, MAX_LENGTH);
  15. strcat(s2, sHelp);
  16. //cout << s2 << endl;
  17. strcat(s1, s2);
  18. cout << s1;
  19. return 0;
  20. }
Success #stdin #stdout 0.01s 5272KB
stdin
Ana are mere
, pere si portocale
stdout
Ana are mere, pere si portocale