Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //https://pastebin.com/mhPBmQc2
- #include <bits/stdc++.h>
- using namespace std;
- int main()
- {
- char s[101], a[101], b[101],aux[100];
- char *p;
- cin.getline(s, 101);
- cin.getline(a, 101);
- cin.getline(b, 101);
- while (p = strstr(s, a))
- {
- strcpy(aux, b);
- strcat(aux, p + strlen(a));
- strcpy(p,aux);
- }
- puts(s);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement