37. C Program to Check given Input is Vowel or Not using Switch Case.
How does this program work?
- This Program is used to how to Identify the given input is Vowel or Consonant using Switch Case.
Here is the code
int main()
{
//To check a letter Vowel or Consonant
char ch;
//Enter Input alphabet
printf("Enter any alphabet: \n");
scanf("%c", &ch);
switch(ch)
{
case 'a':
case 'e':
case 'i' :
case 'o':
case 'u':
case 'A':
case 'E' :
case 'I' :
case 'O':
case 'U':
printf( "Vowel: %c",ch);
break;
default:
printf("Consonant: %c",ch);
}
return 0;
}