Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "pch.h"
- #include <iostream>
- using namespace std;
- int Input(int lowBorder, int highBorder)
- {
- int input;
- while (!(cin >> input && input >= lowBorder && input < highBorder))
- {
- cout << "\nВвод некорректен. Повторите ввод: ";
- cin.clear();
- while (cin.get() != '\n');
- }
- while (cin.get() != '\n');
- return input;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement