Hi all,
I'm having trouble diagnosing a while loop I created to analyze a string's number of vowels and consonants. Here is my code:
while (string[i] != '\n')
{
if (string[i] == 'a' )
vowels++;
else
consonants++;
i++;
}//end of analyzing loop
Some help would be greatly appreciated.