#include using namespace std; int main() { int age {20}; string word; cout << "Enter your age "; cin >> age; while (not cin) { cin.clear(); cin >> word; cout << "Cleared the junk " << word << endl; cin >> age; } /* if (cin) { cout << "We got the input successfully" << endl; } else { cout << "The input failed " << endl; cin.clear(); cin >> word; } */ cout << "Age is " << age << endl; cout << "Word is \"" << word << "\""<< endl; return 0; }