#include #include using namespace std; int main() { char s[6], c1, c2, *p; cin >> s >> c1 >> c2; while (strcmp (s, "0") != 0 && c1 != '0' && c2 != '0') { p = strchr (s, c1); while (p) { s[p-s] = c2; p = strchr (s, c1); } cout << endl << atoi (s); cin >> s >> c1 >> c2; } return 0; }