Skip to content

Instantly share code, notes, and snippets.

@mohnoor94
Created August 20, 2017 21:03
Show Gist options
  • Select an option

  • Save mohnoor94/3f6b16dc5a7d44c63daa04d326390c0d to your computer and use it in GitHub Desktop.

Select an option

Save mohnoor94/3f6b16dc5a7d44c63daa04d326390c0d to your computer and use it in GitHub Desktop.
A full C++ program that contains a function isVowel returns the value true if a given character is a vowel and otherwise returns false
// www.abukhleif.com
#include <iostream>
using namespace std;
bool isVowel (char x) {
char y = toupper(x);
return (y=='A' || y=='E' || y=='I'|| y=='O'|| y=='U');
}
int main() {
cout<< isVowel('a');
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment