Easy program to check input alphabet is vowel or not

This program checks whether an input alphabet is a vowel or not.  Both lower-case and upper-case are checked i.e a, A, e, E, I, i, o, O, u, U.

#include <stdio.h>

#include <conio.h>

int main()

{

char ch;

printf(“Input 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);

break;

default:

printf(“%c is not a vowel.\n“, ch);

}

return 0;

}

Mohit Arora
Follow me