- #include<stdio.h>
- #include<string.h>
- int main()
- {
- int i,n,l=0;
- char a[120];
- scanf("%s",a);
- n=strlen(a);
- for (i=0;i<n;i++)
- {
- if (a[i]=='h' && l==0) l++;
- else if (a[i]=='e' && l==1) l++;
- else if (a[i]=='l' && l==2) l++;
- else if (a[i]=='l' && l==3) l++;
- else if (a[i]=='o' && l==4) l++;
- if (l==5) break;
- }
- if (l==5) printf("YES\n");
- else printf("NO\n");
- return 0;
- }
Tuesday, January 21, 2020
Codeforces 58A Chat room Solution in C
Subscribe to:
Post Comments (Atom)
Codeforces 131A cAPS lOCK Solution in C
#include <stdio.h> int main () { char ch [ 106 ]; int i , j , ck = 1 ; scanf ( "%s" , ch ); ...
-
#include <stdio.h> #include <string.h> int main () { int i , n , l = 0 ; char a [ 120 ]; scanf ( ...
-
#include <stdio.h> int main () { int o , n , a , b , c , s , t , u ; s = 0 ; t = 0 ; u = 0 ...
-
#include <stdio.h> #include <string.h> int main () { int i , n , p = 0 ; char s [ 120 ]; scanf ( ...
too good solution thank you so much
ReplyDelete