Check whether an alphabet is vowel or consonant using switch statement
mrt481 7.5K 28th Aug, 2022
Loading Please wait...
Description
In the above program, instead of using a long if condition, we replace it with a switch case statement. If ch is either of cases: ('a', 'e', 'i', 'o', 'u'), vowel is printed. Else, default case is executed and consonant is printed on the screen.
Recent Pastes
- C++ Program to Add Two Numbers
C++ | 6.1K | 1 year ago
- C++ Program to Print Number Entered by User
C++ | 3.6K | 1 year ago
- C++ "Hello, World!" Program
C++ | 2.6K | 1 year ago
Please disable your adblock and script blockers to view this page