value returning function problem

I have tried this program & ran it like 10 times on the compiler on mindtap yet it still does not give me full credit.

here's the code
#include <iostream>

using namespace std;

bool isVowel(char letter);

int main()
{
char ch;

cout << "Please enter a character: ";
cin >> ch;

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;
}
}
Last edited on
Topic archived. No new replies allowed.