// Simple example of input validation. #include using namespace std; int main() { const int LOWER_BOUND = 0; const int UPPER_BOUND = 100; int num; cout << "Enter a number between " << LOWER_BOUND << " and " << UPPER_BOUND << ": "; cin >> num; // Fall through loop only if input is valid. while (num < LOWER_BOUND || num > UPPER_BOUND) { cout << "Enter a number between " << LOWER_BOUND << " and " << UPPER_BOUND << ": "; cin >> num; } cout << "Congratulations, you can follow directions." << endl; return 0; }