-
Notifications
You must be signed in to change notification settings - Fork 0
/
EZSPEAK.cpp
43 lines (34 loc) · 851 Bytes
/
EZSPEAK.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#include <iostream>
#include <cstring>
using namespace std;
int main()
{
int t;
cin>>t;
while(t--)
{
int n;
cin>>n;
string str;
cin>>str;
int count=0;
bool flag=1;
for(int i=0;i<str.length();i++)
{
//if str[i] is consonants then count++
if(str[i]!='a' and str[i]!='e' and str[i]!='i' and str[i]!='o' and str[i]!='u')
count++;
else
count=0;
//if count is greater than equal to 4 thats mean it is hard to Pronunciation
if(count>=4)
{
cout<<"NO"<<endl;
flag=0;
break;
}
}
if(flag)
cout<<"YES"<<endl;
}
}