Created
January 17, 2014 19:46
-
-
Save selevit/8480127 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Дана последовательность, для */ | |
#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