#include <iostream>
#include <cmath>
using namespace std;
int main()
{
// Variables
double a = 0, b = 0, c = 0;
double x;
double condition;
double sub_condition;
double y;
// Input
cout << "Input numbers:" << endl;
cout << "a = ";
cin >> a;
cout << "b = ";
cin >> b;
cout << "c = ";
cin >> c;
cout << "x = ";
cin >> x;
// Create condition
condition = abs(1 - pow(x, 2));
sub_condition = a + c;
// Solution
if (condition == sub_condition) {
y = sqrt(abs(a * x - pow(cos(pow(b, 3)), 2) * x + 5.1 * pow(c, 2)));
}
else if (condition > sub_condition) {
y = exp(0.04 * x) + log(pow(b, 5) * cos(x));
else {
y = pow(cos(pow(b, 3) * pow(x, 2)), 2) + log(abs(b * x - pow(a, 2)));
cout << "Answer: y = " << y << endl;
return 0;
#include <iostream>
#include <cmath>
using namespace std;
int main()
{
// Variables
double a = 0, b = 0, c = 0;
double x;
double condition;
double sub_condition;
double y;
// Input
cout << "Input numbers:" << endl;
cout << "a = ";
cin >> a;
cout << "b = ";
cin >> b;
cout << "c = ";
cin >> c;
cout << "x = ";
cin >> x;
// Create condition
condition = abs(1 - pow(x, 2));
sub_condition = a + c;
// Solution
if (condition == sub_condition) {
y = sqrt(abs(a * x - pow(cos(pow(b, 3)), 2) * x + 5.1 * pow(c, 2)));
}
else if (condition > sub_condition) {
y = exp(0.04 * x) + log(pow(b, 5) * cos(x));
}
else {
y = pow(cos(pow(b, 3) * pow(x, 2)), 2) + log(abs(b * x - pow(a, 2)));
}
cout << "Answer: y = " << y << endl;
return 0;
}