58A

#include <stdio.h>
#include <string.h>
int main()
{
    char hel[6]="hello";
    char str[120];
    memset(str, 0, sizeof(str));
    scanf("%s", str);
    int length=strlen(str);
    int ind=0;
    int i;
    for(i=0; (i<length)&&(ind<5); ++i)
    {
        if(str[i]==hel[ind])
            ++ind;
    }
    if(ind==5)
        printf("YES\n");
    else
        printf("NO\n");
   // printf("ind=%d\n", ind);
    return 0;
}

  

猜你喜欢

转载自www.cnblogs.com/ozxics/p/10656531.html
58A
58