Infolinks - Earn Easy Money

Saturday, April 4, 2015

C++ Program to findout either the given character is vowel or not using Switch

#include <iostream>
using namespace std;
int main (  )
{
char a;
cout <<" Enter a character \n ";
cin >> a;

switch ( a )
{
case 'a' :
case 'e' :
case 'i' :
case 'o' :
case 'u' :
cout <<" Character is a vowel alphabet ";
break ;
default :
cout <<" Character is not a vowel ";
}
return 0;
}

No comments:

Post a Comment

Must drop your comments about post.