123456789101112
#include <iostream> using namespace std; int main() { char a[10]; char b[10]; char c[20]; cin >> a; cin >> b; c[20] = a[10] + b[10]; cout << "\n" << c; }
12345678910111213141516
#include <iostream> #include <string> int main() { // https://cal-linux.com/tutorials/strings.html std::string a ; std::string b ; std::cin >> a; std::cin >> b; const std::string c = a + b; std::cout << '\n' << c << '\n' ; }