C program to check given alphabet is a vowel or not using switch case

Program

#include<stdio.h>
#include<conio.h>

void main()
{
char ch;
clrscr();
printf(“Enter an alphabet:”);
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(“The alphabet is vowel”);
break;
default: printf(“The alphabet is not vowel”);
}

getch();
}

Output

Leave a Comment

error: Alert: Content is protected!!