// prints if the character input is a vowel, \ // uses if-construct // 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 if ((ch == 'a') || (ch == 'A')) // if A cout << ch << " is a vowel\n"; else if ((ch == 'e') || (ch == 'E')) // if E cout << ch << " is a vowel\n"; else if ((ch == 'i') || (ch == 'I')) // if I cout << ch << " is a vowel\n"; else if ((ch == 'o') || (ch == 'O')) // if O cout << ch << " is a vowel\n"; else if ((ch == 'u') || (ch == 'U')) // if U cout << ch << " is a vowel\n"; else // all checks failed cout << ch << " is not a vowel\n"; }