Public feed
#725143
#include <iostream>using namespace std;//Declaring function isVowel so that main can call itbool isVowel(char x);int main() { //input character char c; //get user input cout << "Input a letter: "; cin >> c; //if isVowel (the function) returns true its a vowel so print that it is a vowel if (isVowel(c)) cout << endl << c << " is a vowel."; //if isVowel did not return true it returned false... could have use an else if here, but just else is sufficient else cout << endl << c << " is a consonant."; //keep program open cin >> c; return 0;}//isVowel definition... returns type bool, takes char type as an inputbool isVowel(char ch) { //if test on inputted ch char... uses | for or if ((ch == 'a') || (ch == 'e') || (ch == 'i') || (ch == 'o') || (ch == 'u') ||(ch == 'A') || (ch == 'E') || (ch == 'I') || (ch == 'O') || (ch == 'U')) return true; //if not true then return false else return false;}