I believe @gadeprathmesh12 is trying to count the number of vowels in two separate sections of a word. For example if the number of vowels in a eight letter word is four; are two vowels coming from the first four letters and the other two coming the last four letters of the word or does one section have more vowels than the other. Returning false if the latter is true.
You should use OR “||” instead of AND “&&“ when checking for the equality of s[i] in the if(). If the s[i] is forced to be all vowels at once the vowel count will incorrect and won’t increase.
I know what they are trying to do, but they need to be able to explain it in words themselves before they can implement the code.
You are simply providing the answer rather than helping them find it themselves.
It is great that you solved the challenge, but it is best to stay focused on answering the original poster’s question(s) and help guide them with hints and suggestions to solve their own issues with the challenge. How to Help Someone with Their Code Using the Socratic Method