i am trying to write a switch statement that displays whether ch is a vowel, a digit, or something else. i got it to display it as a vowel or something else but the digit part is killing me. this is what i have:
i am lost any help would be great thanksCode:#include <iostream> using std::cout; using std::cin; int main() { char ch; //prompt user cout << "Enter an character: "; cin >> ch; //print out the common part of the message here to save typing cout << "You entered "; switch( ch ) { case 'A': case 'E': case 'I': case 'O': case 'U': case 'a': case 'e': case 'i': case 'o': case 'u': cout << "a vowel.\n"; // it's a vowel, process accordingly break; case ch 0 - 9: //>= '0' && ch <= '9': cout << "a digit.\n"; default: cout << "something else.\n"; break; } return 0; }