if (isVowel(ch))
cout << ch << " is a vowel" << endl;
else
cout << ch << " is not a vowel" << endl;
return 0;
}
bool isVowel(char letter) {
switch (letter) {
case 'A':
case 'a':
case 'E':
case 'e':
case 'I':
case 'i':
case 'O':
case 'o':
case 'U':
case 'u':
return true;
default:
return false;
}
I changed it to this & still gives me 33%
that's error prone.
may do letter = std::tolower(letter); inside the `isVowel()' function instead.
> 'Y' and 'y' are vowels too
yes, beyond all doubt, young man.
¿what do we do with w?
by the way, I suggest we continue the discussion in the original thread http://www.cplusplus.com/forum/beginner/225724/
(because it was created earlier, and beginner section seems more appropriated)