dxvmxnd

Untitled

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