#include <stdio.h>
#define MAX 1024
int main()
{
int i;
int j;
int temp;
int count = 0;
char src[MAX];
char str[MAX];
printf("Please input a string:");
scanf("%s",src);
printf("Please input the string you want to find out:");
scanf("%s",str);
for(i = 0; src[i] != '\0'; i++)
{
temp = i;
for(j = 0; str[j] != '\0'; j++)
{
if(str[j] == src[i])
{
i++;
}
}
if(i - temp == j)
{
count++;
}
i = temp;
}
printf("The number is %d\n",count);
return 0;
}