#include<stdio.h>
#include<string.h>
int main()
{
char m[100],n[100],temp[100];
scanf("%s %s",m,n);
int mlen=strlen(m);
int nlen=strlen(n);
char *s=m;
char *t=n;
char *p;
int i=0;
while(*s++)
{
i=0;
p=s;
t=n;
while(*p++==*t++)
{
i++;
}
if(i>=nlen)
{
*s='\0';
strcat(m,p+1);
}
}
printf("%s",m);
}
删除子串
最新推荐文章于 2022-11-26 10:49:22 发布