Q21. Write a code to check whether a character is vowel or consonant

Vowel :- In English, five alphabets A, E, I, O, and U are called as Vowels.
Consonant :- In English, all alphabets other than vowels are Consonant.
For Example :-
Input = E
Output = E is Vowel.
So as we can see that E is alphabets which is Vowel. So, the output is “E is Vowel”.

check whether a character is vowel or consonant Algorithm 

START
Step 1 – Input the alphabets.
Step 2 – Check if the alphabets is (a, e, i, o, u) if alphabet is among these then it is vowel.
Step 3 – If the alphabets is vowel than print Vowel otherwise print Consonant.
STOP

check whether a character is vowel or consonant code

Output

M is a consonant.

Recommended Programs
Program to find factorial of a number
Program to count number of digits in a number