Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using std::cout;
- using std::cin;
- using std::endl;
- void main()
- {
- setlocale(LC_ALL, "Russian");
- int a, i = 0;
- /*while (i < 1)
- {
- cout << "Введите число: "; cin >> a;
- if (a >= 1 && a <= 4)
- {
- cout << "Вы ввели: " << a << endl;
- break;
- }
- else cout << "Это недопустимое значение, введите число еще раз" << endl;
- }*/
- /*
- for (;;)
- {
- cout << "Введите число: "; cin >> a;
- if (a < 1 || a > 4) cout << "Это недопустимое значение, введите число еще раз: " << endl;
- else break;
- }
- cout << "Вы ввели: " << a << endl;
- */
- /*do
- {
- cout << "Введите число: "; cin >> a;
- if (a < 1 || a > 4) cout << "Это недопустимое значение, введите число еще раз: " << endl;
- } while ( !(a >= 1 && a <= 4) );
- cout << endl;
- cout << "Вы ввели: " << a << endl;*/
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement