0
#include <iostream>
#include <string>
using namespace std;

int main() {
    string x  ;
    string y ;
    string sum;
    string z = " " ;
    
  cout << "Write your name:" ;
  cin >> x ;
cout  << "Write your second name:" ;
cin >>  y ;
  sum = (x+z+y) ;
  cout << "your name is:" << sum ;
  
  return 0 ;
}

Is there another way to add a space between this two names other than string z = " " to be like that your name is first name( space)second name

0 Answers0