Write a value-returning method, isVowel, that returns the value true if a given character is a vowel, and otherwise returns false
& I changed it with upper case letters
#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;
}
}