12345678910111213141516171819202122232425262728293031
#include <iostream> using namespace std; bool isVowel(char); int main(){ char ch; cout << "enter" << endl; cin >> ch; bool isvowel = isVowel(ch); if (isvowel == true) cout << "It is a vowel" << endl; return 0; }// Function Main() // ===================== bool isVowel(char ch) { if (ch == 'a' || ch == 'e' || ch == 'i' || ch == 'o' || ch == 'u') return true; else return false;
if (isvowel == true)
if (isvowel)
return (ch == 'a' || ch == 'e' || ch == 'i' || ch == 'o' || ch == 'u');
return std::string("aeiou").find(ch) != std::string::npos;