// prints if the character input is a vowel using SWITCH // mikhail nesterenko // 09/16/99 #include using namespace std; int main() { // inputs the character char ch; cout << "Enter the character: "; cin >> ch; // checks if ch is vowel and prints switch (ch) { case 'a': case 'A': // vowel cases case 'e': case 'E': case 'i': case 'I': case 'o': case 'O': case 'u': case 'U': cout << ch << " is a vowel\n"; break; // don't forget! default: cout << ch << " is not a vowel\n"; } }