Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- double Input(bool t) // t вспомогательная переменная для степени
- {
- double input;
- if (t)
- {
- while (!(cin >> input && input >= 0 && input < 7))
- {
- cout << "\nВвод некорректен. Повторите ввод: ";
- cin.clear();
- while (cin.get() != '\n');
- }
- while (cin.get() != '\n');
- }
- else
- {
- while (!(cin >> input && input >= 0))
- {
- cout << "\nВвод некорректен. Повторите ввод: ";
- cin.clear();
- while (cin.get() != '\n');
- }
- while (cin.get() != '\n');
- }
- return input;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement