Skip to content

Instantly share code, notes, and snippets.

@KristianLyng
Created April 25, 2010 12:36
Show Gist options
  • Select an option

  • Save KristianLyng/378375 to your computer and use it in GitHub Desktop.

Select an option

Save KristianLyng/378375 to your computer and use it in GitHub Desktop.
main(){
char w[99],r[99],b[999],*c=b,i=0,x;
gets(w);
gets(r);
gets(c);
while(*c){
i=w[i]?i:!printf(r);
if(*c!=w[i]){
while(i)
putchar(*(w+x+--i));
x=!putchar(*c);
}else
i++;
c++;
}
puts("");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment