Что не так?
#include
#include
using namespace std;
int main()
{int k, x, y;
cout << "Vvedite x: ";
cin >> x;
cout << "Vvedite y: ";
cin >> y;
if ( x = y +2 ) k = x + (y*y) + 2;
else if (x > y + 2, y = 3 ) k = x + y +2;
else if (x > 0 < y + 2) k =(sin(x)+sin(2));
else k = x+log abs(y+(2*y));
cout << "k=" << k << endl;
return 0;}
Answers & Comments
Ответ:
if (x == y + 2)
k = x + (y*y) + 2;
else if (x > y + 2 && y == 3)
k = x + y + 2;
else if (x > 0 && x < y + 2)
k = (sin(x) + sin(y));
else
k = x + log(abs(y + (2 * y)));
cout << "k=" << k << endl;
return 0;
Объяснение:
Ответ:
#include <iostream>
#include <cmath>
using namespace std;
int main()
{
int k, x, y;
cout << "Vvedite x: ";
cin >> x;
cout << "Vvedite y: ";
cin >> y;
if (x == y + 2)
k = x + (y * y) + 2;
else if (x > y + 2 && y == 3)
k = x + y + 2;
else if (x > 0 && x < y + 2)
k = sin(y) + sin(2);
else
k = x + log(abs(y + (2 * y)));
cout << "k=" << k << endl;
return 0;
}