Advertisement
Razija

kopira x1 i x2 u x3

May 27th, 2019
110
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. #include <iostream>
  2. #include <string>
  3.  
  4. using namespace std;
  5.  
  6. int main ()
  7. {
  8. string x1, x2, x3;
  9. cin >> x1;
  10. cin >> x2;
  11.  
  12. for (int i=0; i<x1.length(); i++)
  13. {
  14. x3[i] = x1[i];
  15. cout << x3[i];
  16. }
  17.  
  18. cout << " ";
  19.  
  20. for (int i=0; i<x2.length(); i++)
  21. {
  22. x3[i] = x2[i];
  23. cout << x3[i];
  24. }
  25.  
  26. return 0;
  27.  
  28.  
  29.  
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement