//Downloaded From theonlinetutorials.com
#include<iostream.h>
#include<conio.h>
void main()
{
char ch;
cout<<"Enter a character value" ;
cin>>ch;
switch(ch)
{
case 'a':
case 'e':
case 'i':
case 'o':
case 'u':
{
cout<<"Vowel";
break;
}
default:
cout<<"Not a vowel";
}
getch();
}
Output:1
Enter a character : i
Vowel
Output:2
Enter a character : h
Not a vowel
Not Satisfied ? Just search & get the result
Related posts:
- Swith….Case Statements in C++
- C++ Program – Calculator
- Sample – Program to identify if an input is a symbol, digit or character.
- Sample – Program to enter a sentence and output the number of uppercase & lowercase consonants, uppercase & lowercase vowels in sentence..
- C++ Program – Text file handling
