Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int exceptRead(int i, int j) {
- bool isNotCorrect;
- int number;
- number = 0;
- do {
- isNotCorrect = false;
- cout << "Введите " << (i + 1) << "," << (j + 1) << " пункт матрицы." << endl;
- cin >> number;
- if (cin.fail()) {
- isNotCorrect = true;
- cout << "Неверный ввод данных!" << endl;
- cin.clear();
- while (cin.get() != '\n');
- }
- } while (isNotCorrect);
- return number;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement