12345678910111213141516171819202122
#include <iostream> using namespace std; int main() { int num; cout << "Enter and number between 0 and 35.\n"; cin >> num; if (num <= 9) cout << num << endl; else if (num >= 10) cout << static_cast<char>(num-10+'A') << endl; else if (num >=! 10) cout << "You have entered an invalid number."; return 0; }