Y
Y
Yuri2020-10-23 15:55:38
Mathematics
Yuri, 2020-10-23 15:55:38

How to find the value of a function?

Can you help me solve the problem? I haven't quite figured out the c++ syntax yet.
Here is the Condition function (x,y)=1/5* + sqrt(exp(x-1)+exp(y-1)/cossqr(x+2y). I got something like this:

//вычислить значение функции
#include <iostream>
#include <cmath>
using namespace std;
int main()
{
    setlocale(LC_ALL, "RUS");
    float x, y;
    cout << "x = ";
    cin >> x;
    cout << "y = ";
    cin >> y;
    float c = 1.0 / 5; x * y + sqrt(exp(x - 1)) + exp(y - 1) / cos(x + 2 * y);
    cout << "Результат: " << c << endl;
    system("pause");
    return 0;
}

What is wrong here? Please write the correct option.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander Ananiev, 2020-10-23
@uriy99

The condition is written incorrectly here

float c = 1.0 / 5; x * y + sqrt(exp(x - 1)) + exp(y - 1) / cos(x + 2 * y);

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question