fork download
  1. #include <iostream>
  2. #include <string>
  3. int main() {
  4. std::string a, b;
  5. getline(std::cin, a);
  6. getline(std::cin, b);
  7. std::cout << a << '\n';
  8. for (int i = 0; i < a.length(); i++) {
  9. if (a[i] == b[i]) continue;
  10. a[i] = b[i];
  11. std::cout << a << '\n';
  12. }
  13. }
Success #stdin #stdout 0s 3472KB
stdin
wood
book
stdout
wood
bood
book