#include <iostream>
#include <cmath>
signed main() {
setlocale(LC_ALL, "Rus");
double x, y, a;
std::cout << "Введите x и y: ";
std::cin >> x >> y;
if (x * y > 0)
a = pow(x * y, 2) - sqrt(x * y);
else if (x * y < 0)
a = pow(x * y, 2) + sqrt(abs(x * y));
else if (x * y == 0)
a = pow(x + y, 2) + 1;
std::cout << a;
return 0;
}
Copyright © 2024 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
#include <iostream>
#include <cmath>
signed main() {
setlocale(LC_ALL, "Rus");
double x, y, a;
std::cout << "Введите x и y: ";
std::cin >> x >> y;
if (x * y > 0)
a = pow(x * y, 2) - sqrt(x * y);
else if (x * y < 0)
a = pow(x * y, 2) + sqrt(abs(x * y));
else if (x * y == 0)
a = pow(x + y, 2) + 1;
std::cout << a;
return 0;
}