C++ Program – Vowel checking

by Nideesh C on May 7, 2011 · 0 comments

in C++




//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 Plugin for WordPress, Blogger...
Be Sociable, Share!

Related posts:

  1. Swith….Case Statements in C++
  2. C++ Program – Calculator
  3. Sample – Program to identify if an input is a symbol, digit or character.
  4. Sample – Program to enter a sentence and output the number of uppercase & lowercase consonants, uppercase & lowercase vowels in sentence..
  5. C++ Program – Text file handling

Leave a Comment

Previous post:

Next post: