this program is based on whether the alphabet input by user is Vowel or
Consonant.
If it is vowel then it will give output that Alphabet entered is vowel otherwise
Alphabet is consonant.
Program
#include <stdio.h>
#include <conio.h>
void main()
{
char a;
printf("Enter any Alphabet: ");
scanf("%c",&a);
if(a=='a' || a=='A')
printf("%c is a vowel",a);
else
if(a=='e' || a=='E')
printf("%c is a vowel",a);
else
if(a=='i' || a=='I')
printf("%c is a vowel",a);
else
if(a=='o' || a=='O')
printf("%c is a vowel",a);
else
if(a=='u' || a=='U')
printf("%c is a vowel",a);
else
printf("Alphabet entered is consonant");
}
Output:
Post a Comment