fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. string nume, prenume, numeComplet;
  6. cin >> nume >> prenume;
  7. numeComplet = nume + " " + prenume;
  8. for (int i = 0; i <= prenume.size(); ++i) {
  9. numeComplet.pop_back();
  10. }
  11. cout << numeComplet;
  12. return 0;
  13. }
Success #stdin #stdout 0.01s 5280KB
stdin
Popa Eugen
stdout
Popa