Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <windows.h>
- #include <cstdlib>
- #include <iostream>
- using namespace std;
- int main()
- {
- SetConsoleCP(1251);
- SetConsoleOutputCP(1251);
- int a;
- cout << "Введите число ";
- while (!(cin >> a))
- {
- cin.clear();
- while (cin.get() != '\n');
- cout << "Неверный ввод. Повторите." << endl;
- cout <<"Введите число ";
- }
- cout << a << endl;
- system("pause");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement