Welcome to " way2cplusplus.blogspot.in " Objective of this blog is to implement various Computer Science Engineering Lab problems into C++ programming language. These are basically most common Lab Exercise problems based on the curriculum of engineering colleges throughout the Nation. These lab exercises are also relevant to Data structure. Simply C++ programming zone...
-Pages-
▼
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();
No comments:
Post a Comment