Alright, so the assignment for my entry level c++ class is to write a function isVowel in a program that can identify whether a letter entered by a user is a vowel or not. Here is what I have conjured up however know from looking at it I am very wrong in my approach, can somebody out there send me in the right direction, I cannot figure it out from my text and tutorials. Thanks for your input!
Code:#include <iostream> using namespace std; char isVowel(char ch); int main() { char ch; cout << "Please enter a letter from the alphabet: "; cin >> ch; cout<<"the letter you have entered is: isVowel(ch)"; return 0; } char isVowel(char x) { if (char ch = 'a') cout << "A Vowel" <<endl; else cout << "Not a vowel" <<endl; return 1; }