#include #include using namespace std; int main() { SetConsoleOutputCP(1251); double x{}; double &rx = x; while (true) { cout << "Введіть x: "; cin >> rx; if (cin.fail()) { cin.clear(); cin.ignore(32767, '\n'); cout << "Введене значення має бути числом. Спробуйте ще раз!" << endl; continue; } else { break; } } if (sin(rx) + cos(rx) < 0) { cout << "Неможливо обчислити корінь з числа " << sin(rx) + cos(rx); } else { cout << "Обчислене значення - " << sqrt(sin(rx) + cos(rx)) << endl; } }