A program in C++ to find the whether the entered character is vowel or a consonant (not-vowel) , using the control statement Switch
CODE:
CODE:
#include<iostream.h> #include<conio.h> void main() { char ch; <<endl<<endl; cout<<"Enter any character: "<<endl; cin>>ch; switch (ch) { case 'a': case 'A': cout<<"It is a vowel"; break; case 'e': case 'E': cout<<"It is a vowel"; break; case 'i': case 'I': cout<<"It is a vowel"; break; case 'o': case 'O': cout<<"It is a vowel"; break; case 'u': case 'U': cout<<"It is a vowel"; break; default: cout<<"It is a vowel"; } getch(); }
For Further Reading,
- Program:To check if a character is vowel or not (using if-else Statement)
- Program: To find greatest Of Three Using nested If-else Statement
- Program: To find whether the entered character is vowel or a consonant
- Program: To print Fibonacci series
- Program:To print the table of number in c++
- Program: Multiplication of Matrices
0 comments:
Post a Comment