Check alpabet or vowel or not in C++ by R4R Team

What is Vowel :
The alphabet {A,E,I,O,U} and {a,e,i,o,u} is known as vowels.
Other then this alphabet are known as consonant.


#include < iostream>
using namespace std;
int main()
char s;
cout<<"Enter any Character"<< endl;
if(s=='A'||s=='E'|| s=='I' || s=='O' || s=='U'|| s=='a'||s=='e'|| s=='i' || s=='o' || s=='u')
cout<<"Character is vowel";
cout<<"Character is not vowel";
return 0;


Enter any character
Character is vowel

Enter any character
Character is not vowel

-In this program, we take an input of any alphabet and check whether it is vowel or not.
- We just pass that variable in if() condition, as shown in above program,
-if this condition is true then it is vowel other it is consonant.

Leave a Comment:
R4R Team
R4Rin Top Tutorials are Core Java,Hibernate ,Spring,Sturts.The content on website is done by expert team not only with the help of books but along with the strong professional knowledge in all context like coding,designing, marketing,etc!