My issue
i have an error at case two “15 schtschurowskia”
My code
#include <stdio.h>
#define MAX_LENGTH 100
const char* easy_to_pronunciation(const char* str){
int consonants_count=0;
const char* vowels = "a,e,i,o,u";
for(int i=0;str[i];i++){
if(strchr(vowels, str[i])==NULL){
consonants_count++;
if(consonants_count>=4) return "NO";
}
else{
consonants_count==0;
}
}
return "YES";
}
int main() {
int T;
scanf("%d",&T);
while(T--){
char S[MAX_LENGTH + 1];
scanf("%s",S);
printf("%s\n",easy_to_pronunciation(S));
}
}
Learning course: Roadmap to 3*
Problem Link: https://www.codechef.com/learn/course/klu-roadmap-3star/KLURMP300A/problems/EZSPEAK