#include <iostream>
#include <string.h>

using namespace std;

int main()
{
    char sir[256],sb[26],*p;
    int a;
    cout<<"Introduceti textul: ";
    cin.get(sir,255);
    cin.get();
    cout<<"Introduceti subsirul care se sterge: ";
    cin.get(sb,25);
    p=strstr(sir,sb);
    a=strlen(sb);
    while(p){
        strcpy(p,p+1+strlen(sb));
        p=strstr(p+a,sb);
       // if(strstr(p+a,sb)==NULL) strcpy(p,p-strlen(sb));
    }
    cout<<sir;
    return 0;
}
