Enter a character from keyboard and check the character is vowel or not by using else-if statement:
#include<stdio.h>
#include<conio.h>
void main()
{
char m;
scanf("%c" ,&m);
if(m==a)
{
printf(" word is vowel");
}
else if(m==e)
{
printf(" word is vowel");
}
else if(m==i)
{
printf(" word is vowel");
}
else if(m==o)
{
printf(" word is vowel");
}
else if(m==u)(
printf(" word is vowel");
}
else(m==a)
{
printf(" word is consonant");
getch();
}
Output1:
Enter a word
a
word is vowel
Output2:
Enter a word
k
word is consonant
0 Response to "C Program: Enter a Character and Check the Character is Vowel or Not by using else-if Statement"
Post a Comment