Home > Back-end >  Bosses, for help
Bosses, for help

Time:06-03

#include
#include//character header file

Int main ()
{
The char m [128], [128] z;//define a character array
Int M_size Z_size, I, j, s=0, sum [128].
Printf (" please enter a string of mother: \ n ");
The scanf (" % s ", m);
Printf (" please enter a string \ n ")
The scanf (" % s ", z);
M_size=strlen (m);//calculate the array size
Z_size=strlen (z);

for(i=0; i{
for(j=0; j{

If (m==z [j] [I])
{
The sum [I]=j;
S++;
break;
}


}
}

If ((s==Z_size) & amp; & (sum of [1]==sum [0] + 1))//judgment Z and m equal to the number of characters in the array in the array and judge whether equal character continuous
{
Printf (" a substring occurs in a string in the first m: % d ", sum [0]).
}

return 0;

}


Could you tell me why can't the input string

CodePudding user response:

I hope it can help you: https://blog.csdn.net/it_xiangqiang/category_10581430.html
I hope it can help you: https://blog.csdn.net/it_xiangqiang/category_10768339.html