C Program to check whether entered Letter is a Vowel or not
This is the c program to check whether the entered letter is a vowel or not using switch case
#include<stdio.h>
main()
{
char word;
printf("Enter the word n");
scanf("%c",&word);
switch(word)
{
case 'a':
{
printf("VOWEL a IS PRESENT n");
break;
}
case 'e':
{
printf("VOWEL e IS PRESENT n");
break;
}
case 'i':
{
printf("VOWEL i IS PRESENT n");
break;
}
case 'o':
{
printf("VOWEL o IS PRESENT n");
break;
}
case 'u':
{
printf("VOWEL u IS PRESENT n");
break;
}
default:printf("NO VOWELS ARE PRESENT n");
}
}
Recent Comments