Advertisement
jhnksr

Vowel Checker

Sep 28th, 2023
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.41 KB | Source Code | 0 0
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5.    
  6.     char ch;
  7.     cout << "Vowel Checker!" << endl;
  8.     cout << "Enter a Character: ";
  9.     cin >> ch;
  10.    
  11.     switch (ch)
  12.     {
  13.         case 'a':
  14.         case 'e':
  15.         case 'i':
  16.         case 'o':
  17.         case 'u':
  18.         case 'A':
  19.         case 'E':
  20.         case 'I':
  21.         case 'O':
  22.         case 'U':
  23.             cout << "It is a vowel.";
  24.             break;
  25.         default:
  26.             cout << "It is not a vowel.";
  27.     }
  28.    
  29.     return 0;
  30.  
  31. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement