发布网友 发布时间:2022-04-24 02:10
共1个回答
热心网友 时间:2023-10-21 03:30
#include <stdio.h>
int find(char *str)
{
char *fstr="the";
int i=0,j,n=0;
while (str[i]!='\0')
{
for(j=0;j<2;j++)
if (str[j+i]!=fstr[j]) break;
if (str[j+i]==fstr[j]) n++;
i++;
}
return n;
}
void main()
{ char a[80];
gets(a);
printf("%d",find(a));
}
热心网友 时间:2023-11-12 04:28
#include <stdio.h>
int find(char *str)
{
char *fstr="the";
int i=0,j,n=0;
while (str[i]!='\0')
{
for(j=0;j<2;j++)
if (str[j+i]!=fstr[j]) break;
if (str[j+i]==fstr[j]) n++;
i++;
}
return n;
}
void main()
{ char a[80];
gets(a);
printf("%d",find(a));
}
热心网友 时间:2023-10-21 03:30
#include <stdio.h>
int find(char *str)
{
char *fstr="the";
int i=0,j,n=0;
while (str[i]!='\0')
{
for(j=0;j<2;j++)
if (str[j+i]!=fstr[j]) break;
if (str[j+i]==fstr[j]) n++;
i++;
}
return n;
}
void main()
{ char a[80];
gets(a);
printf("%d",find(a));
}
热心网友 时间:2023-10-21 03:30
#include <stdio.h>
int find(char *str)
{
char *fstr="the";
int i=0,j,n=0;
while (str[i]!='\0')
{
for(j=0;j<2;j++)
if (str[j+i]!=fstr[j]) break;
if (str[j+i]==fstr[j]) n++;
i++;
}
return n;
}
void main()
{ char a[80];
gets(a);
printf("%d",find(a));
}