#include #include using namespace std; const char STOP_LETTER{'X'}; int main() { char letter; char upperLetter; cout << "Enter a character => "; cin.get(letter); cin.ignore(numeric_limits::max(),'\n'); upperLetter = static_cast(toupper(letter)); while (cin and upperLetter != STOP_LETTER) { cout << "The character is '" << letter << '\'' << endl; cout << "The upper case version is '" << upperLetter << "'" << endl; cout << endl; if (isalpha(letter)) { cout << "It is a letter" << endl; cout << endl; } if (isdigit(letter)) { cout << "It is a digit" << endl; cout << endl; } if (isspace(letter)) { cout << "It is whitespace " << endl; cout << endl; } if (ispunct(letter)) { cout << "It is punctuation " << endl; cout << endl; } cout << endl << endl; cout << "Enter a character => "; cin.get(letter); cin.ignore(numeric_limits::max(),'\n'); upperLetter = static_cast(toupper(letter)); } return 0; }