C++ program to check input Alphabet is Vowel or not

#include<iostream.h>
#include<conio.h>
void main()
{
char x;
cout<<"\nEnter character = ";
cin>>x;
if(x=='a'||x=='e'||x=='i'||x=='o'||x=='u'||x=='A'||x=='E'||x=='I'||x=='O'||x=='U')
   {
    cout<<x<<" is vowel";
   }
else
 {
  cout<<x<<" is not a vowel";
 }
getch();
}

OUTPUT:-

Leave a Reply

Your email address will not be published. Required fields are marked *