Check whether input alphabet is a vowel or not...
C++ program to
checks whether an input alphabet is a vowel or not. Both lower-case and upper-case are checked.Simply use of switch case to check the input character is same as vowels .
Source Code:-
#include <iostream.h>
#include<conio.h>
void main()
{ clrscr();
cout<<"Program To Check Vowel by-Tarun Rawat \n";
char ch;
cout<<"\nInput a character: ";
cin>>ch;
switch(ch)
{ case 'a': case 'A':
case 'e': case 'E':
case 'i': case 'I':
case 'o': case 'O':
case 'u': case 'U':
cout<<"\n"<<ch<<" is a Vowel";
break;
default:cout<<"\n"<<ch<<" is not a Vowel";
}
getch();
}
Find Us On Google, Just type - way2cplusplus -
If you have any questions on implementing or understanding this C++ Program , shoot me a comment and I'll be glad to help! :) :)
No comments:
Post a Comment