#include #include using namespace std; //Introducing two more members of namespace std, cin and cerr. //And another possible exit status number, EXIT_FAILURE. //The if (!cin) means "if cin is in an unhealthy state as a result //of a failure of the previous attempt at input". int main() { int price {0}; //This variable will die whenever we return. cout << "Please type the price and press RETURN.\n"; cin >> price; if (!cin) { cerr << "Sorry, that wasn't an acceptable number.\n"; return EXIT_FAILURE; } cout << "The variable contains " << price << ".\n"; return EXIT_SUCCESS; }