Ответ:
#define _USE_MATH_DEFINES
#include <iostream>
#include <cmath>
using namespace std;
int main()
{
float x, y, z;
bool b;
setlocale(LC_ALL, "Russian");
cout << "Введите x: ";
cin >> x;
cout << "Введите у: ";
cin >> y;
b = true;
if (x + 0.5 * y <= 1)
z = x / (pow(sin(y), 2));
else if (1 < x && 0.5 * y < 5)
z = pow(M_E, x) + pow(M_E, y);
else if (x + 0.5 * y >= 5)
z = log(3 * (x + y)) + 2.12;
else
b = false;
if (b)
cout << "z = " << z;
cout << "Значение z не определено.";
}
Copyright © 2024 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
Verified answer
Ответ:
#define _USE_MATH_DEFINES
#include <iostream>
#include <cmath>
using namespace std;
int main()
{
float x, y, z;
bool b;
setlocale(LC_ALL, "Russian");
cout << "Введите x: ";
cin >> x;
cout << "Введите у: ";
cin >> y;
b = true;
if (x + 0.5 * y <= 1)
z = x / (pow(sin(y), 2));
else if (1 < x && 0.5 * y < 5)
z = pow(M_E, x) + pow(M_E, y);
else if (x + 0.5 * y >= 5)
z = log(3 * (x + y)) + 2.12;
else
b = false;
if (b)
cout << "z = " << z;
else
cout << "Значение z не определено.";
}