Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <windows.h>
- #include <iostream>
- #include <iomanip>
- #include <string>
- #include <math.h>
- /*
- #include <utility>
- #include <vector>
- #include <fstream>
- #include <iterator>
- #include <algorithm>*/
- using namespace std;
- ///////////////////////////////////
- int main(int argc, char **argv)
- {
- // Руссификация сообщений
- system("chcp 1251 > nul");
- SetConsoleTitle(TEXT("ОтветыМейлРу")); //Для совместимости с VS
- int a=0;
- do
- {
- cout << "Input INT by 1 to 9..." << endl;
- while (!(cin >> a) || (cin.peek() != '\n'))
- {
- cin.clear();
- while (cin.get() != '\n');
- cout << "Input error! Repeat please...\n" << endl;
- }
- } while (a<1 || a>9);
- cout<<endl;
- system("pause");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement