Advertisement
dxvmxnd

Untitled

Sep 17th, 2024
13
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. do {
  2. cout << "Введите бла бла бла" << endl;
  3. isNotCorrect = false;
  4. cin >> x;
  5. if (cin.fail())
  6. {
  7. isNotCorrect = true;
  8. cin.clear();
  9. while (cin.get() != '\n');
  10. cout << "Пожалуйста, вводите числа" << endl;
  11. }
  12. }
  13. while(isNotCorrect);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement