Searching...

Given Alphabet is Vowel or Consonant?

15:44


#include <iostream>
using namespace std;
int main()
{

char alpha;
cout << "Enter An Alphabet: ";
cin >> alpha;
switch (alpha)
{
case 'A':
case 'a':
cout << "You entered a vowel "<<alpha<<endl;
break;
case 'E':
case 'e':
cout << "You entered a vowel "<<alpha<<endl;
break;
case 'I':
case 'i':
cout << "You entered a vowel "<<alpha<<endl;
break;
case 'O':
case 'o':
cout << "You entered a vowel "<<alpha<<endl;
break;
case 'U':
case 'u':
cout << "You entered a vowel "<<alpha<<endl;
break;
default:
cout << "You entered a Consonant "<<alpha<<endl;
}
return 0;
}

0 comments:

Post a Comment

Thanks For Your FeedBack....

:) :)) ;(( :-) =)) ;( ;-( :d :-d @-) :p :o :>) (o) [-( :-? (p) :-s (m) 8-) :-t :-b b-( :-# =p~ $-) (b) (f) x-) (k) (h) (c) cheer
Click to see the code!
To insert emoticon you must added at least one space before the code.