Write a C Program to find the entered character is vowel or consonant.

Write a C Program to find the given character is vowel or consonant.

This program is used to find out whether the entered character is vowel or consonant.

#include<stdio.h>
#include<conio.h>
 
void main()
{           char ch;
             clrscr();
             printf(“Enter a character:”);
             scanf(“%c”,&ch);
             if(ch==’a’ || ch==’e’ || ch==’i’ || ch==’o’ || ch==’u’ || ch==’A’ || ch==’E’ || ch==’I’ ||ch==’O’ || ch==’U’)
             printf(“%c is a vowel”,ch);
             else
             printf(“%c is not a vowel”,ch);
             getch();
}
 
Output :

You may also like...

Leave a Reply