CProgram

Program to check whether the input alphabet is a vowel or not

Write a C program to check whether the input alphabet is a vowel or not.

#include
int main()
{
char ch;
printf(“Enter a character\n”);
scanf(“%c”, &ch);
switch (ch)
{
case ‘a’;
case ‘A’;
case ‘e’;
case ‘E’;
case ‘i’;
case ‘I’;
case ‘o’;
case ‘O’;
case ‘u’;
case ‘U’;
printf(“%c is a vowel.\n”, ch);
else
printf(“%c is not a vowel.\n”, ch);
}
return 0;
}

Output:

check-vowel-c

What's your reaction?

Excited
0
Happy
0
In Love
0
Not Sure
0
Silly
0

You may also like

Leave a reply

Your email address will not be published.

More in:C