//你那个太乱了啊。。我重新写了个。。
#include
#include
int fx(int a, int b)
{
if(a==0) return 1;
if(b==0) return 0;
return a/b;
}
void replace(char *a, char *b)
{
char ch[100], *c, *d;
c=ch; d=a;
while(*a||*b)
{
*c++=(fx(*a, *b)?*b++:*a++);
}
*c=0;
strcpy(d, ch);
}
void main()
{
char s1[100], s2[100];
gets(s1); gets(s2);
replace(s1, s2);
puts(s1);
}