C Program To Check Given Alphabet Is Vowel Or Consonant Using If Else Statement
Example
#include<stdio.h> void main() { char character; printf("nn Enter any one Alphabet: "); scanf("%c",&character); if (character == 'A' || character == 'a') printf("n this is a vowel"); else if (character == 'E' || character == 'e') printf("n this is a vowel"); else if (character == 'I' || character == 'i') printf("n this is a vowel"); else if (character == 'O' || character == 'o') printf("n this is a vowel"); else if (character == 'U' || character == 'u') printf("n this is a vowel"); else printf("n this is a consonant or special character"); }
Output:
Enter any one Alphabet: a this is a vowel