#include
#include
#include
#defineMAX1000
#defineLEN20
voidInput(char*a,char*b,char*c){
gets(a);
gets(b);
gets(c);
}
voidSwap(char*str,char*FindWord,char*SwapWord){
intj,s,k,i=0,SwapWordLength,strLength,FindWordLength,n;
char*p1,*p2;
p1=str;
p2=FindWord;
strLength=strlen(str);//lengthoftheoriginalsentence
FindWordLength=strlen(FindWord);//lengthoftheoldword
SwapWordLength=strlen(SwapWord);//lengthofthenewword
n=SwapWordLength-FindWordLength;
while(*p1!=''){
if((*p1==*p2)&&(!isalpha(*(p1-1))))//isalpha:judgewhetherthechar_cisanenglishwordornot,ifyesreturn!0,ifnoreturn0
while((*p1==*p2)&&(*p2!=''))
{p1++;p2++;i++;}//i:recordhowmanycharshasbeenread
else{p1++;i++;}
if((*p2=='')&&(isalpha(*p1)==0)){
//findtheoldwordinthesentence
if(n