CHECK WHETHER VOWEL OR NOT USING C
CHECK WHETHER VOWEL OR NOT USING C
#include<iostream.h>
#include<conio.h>
void main()
{
clrscr();
char z;
cout<<"enter a
character";
cin>>z;
if(z=='a'||z=='e'||z=='i'||z=='o'||z=='u'|)
cout<<z<<"\t
is lower case vowel";
else
if
(z=='A'||z=='E'||z=='I'||z=='O'||z=='U')
cout<<z<<"\t
is upper case vowel";
else
cout<<z<<"\it
is not a vowel";
getch();
}
OUTPUT:
Enter a character:
B
B is not a vowel.
A
A is uppercase vowel
No comments: