#include<stdio.h>
#include<string.h>
int fun(char a[],char b[],int l,int l1);
int main()
{int l,l1;
char a[1000],b[10];
gets(a);l=strlen(a);
gets(b);l1=strlen(b);
fun(a,b,l,l1);
return 0;
}
int fun(char a[],char b[],int l,int l1)
{int i,j,c=0,k;
for(i=l-l1;i>=0;i--)
{for(j=0;j<l1;j++)
{if(a[i+j]-'0'==b[j]-'0')c++;
}
if(c==l1)break;
c=0;
}
if(c==l1)
{for(k=i;k<l;k++)
printf("%c",a[k]);
}
else printf("not be found!");
return 0;
}
标签:return,ch9.13,int,char,l1,fun,include From: https://blog.51cto.com/u_15758636/5908536