Skip to content

Instantly share code, notes, and snippets.

@selevit
Created January 17, 2014 19:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save selevit/8480127 to your computer and use it in GitHub Desktop.
Save selevit/8480127 to your computer and use it in GitHub Desktop.
/* Дана последовательность, для */
#include <iostream>
#include <cmath>
using namespace std;
// Найти значение выражения
double get_expr_val(double a, double b, double x, double y, double z)
{
double part1 = log(a + b);
double part2 = pow(log(x + y), 3) / log(z + 2);
double part3 = pow(M_E, log(x + y + z));
return part1 + (part2 * part3);
};
int main(int argc, char* argv[])
{
double a, b, x, y, z;
double result;
// Вводим значения переменных через пробел
cout << "Enter A, B, x, y, z: ";
cin >> a >> b >> x >> y >> z;
result = get_expr_val(a, b, x, y, z);
cout << result << endl;
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment