Ксения Райт
Высший разум
(108200)
3 года назад
#include <iostream>
#include <string>
#include <cmath>
using namespace std;
int main() { double x1,x2, x3;
string s = "The function is not defined\n";
cout.precision(16); while (true)
{ cout << "x1 x2: "; cin >> x1 >> x2;
if (x1 == 0 || x2 <= 0 ||x1 == -x2) cout << s;
else { x3 =tan(x1) * pow(x2, x1) / (x1+x2);
if (x3 < 0) cout << s; else cout << x1 / x2 +
x2 * sqrt(x3) / x1 << endl; } } }