You are viewing a single comment's thread. Return to all comments →
MY LOGIC TO SOLVE THIS PROBLEM.
string a, b; cin >> a; cin >> b;
cout << a.length() << " " << b.length() << endl; cout << (a + b) << endl; char first_char_a = a[0]; char first_char_b = b[0]; a[0] = first_char_b; b[0] = first_char_a; cout << a << " " << b << endl;
Seems like cookies are disabled on this browser, please enable them to open this website
Strings
You are viewing a single comment's thread. Return to all comments →
MY LOGIC TO SOLVE THIS PROBLEM.
string a, b; cin >> a; cin >> b;