Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- do {
- cout << "Введите бла бла бла" << endl;
- isNotCorrect = false;
- cin >> x;
- if (cin.fail())
- {
- isNotCorrect = true;
- cin.clear();
- while (cin.get() != '\n');
- cout << "Пожалуйста, вводите числа" << endl;
- }
- }
- while(isNotCorrect);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement