How to write a c Program to input an alphabet and check if it's a vowel in C Programming language ?
Solution:
//Program to input an alphabet and check if it's a vowel.
#include<stdio.h>
#include<conio.h>
void main()
{
char ch;
clrscr();
printf("Enter an alphabet: ");
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("The alphabet %c is a vowel.", ch);
else
printf("The alphabet %c is not a vowel.", ch);
getch();
}