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++ | 5.4K | 10 months ago
- C++ Program to Print Number Entered by User
C++ | 3.2K | 10 months ago
- C++ "Hello, World!" Program
C++ | 2.3K | 10 months ago
Please disable your adblock and script blockers to view this page