You are viewing a single comment's thread. Return to all comments →
int main() { std::string a; std::string b; std::cin>>a; std::cin>>b;
std::cout<<a.size()<<" "<<b.size()<<std::endl; std::cout<<a+b<<std::endl; std::string first_char_of_a = {a[0]}; std::string second_char_of_b = {b[0]}; std::cout<<a.replace(0,1, second_char_of_b)<<" "<<b.replace(0,1,first_char_of_a)<<std::endl; return 0;
}
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 →
int main() { std::string a; std::string b; std::cin>>a; std::cin>>b;
}