fork download
  1. #include <iostream>
  2. #include <cmath>
  3. using namespace std;
  4.  
  5. int main() {
  6. double x, y, z;
  7.  
  8. cout << "Введите x, y, z: ";
  9. cin >> x >> y >> z;
  10.  
  11. if (y == 0 || sin(y) == 0) {
  12. cout << "Ошибка: недопустимые значения y" << endl;
  13. return 1;
  14. }
  15.  
  16. double w = ((x/y) * (z + x) * exp(fabs(x-y)) + log(1 + M_E)) /
  17. (pow(sin(y), 2) - pow(sin(x) * sin(y), 2));
  18.  
  19. cout << "w = " << w << endl;
  20. return 0;
  21. }
Success #stdin #stdout 0.01s 5316KB
stdin
Standard input is empty
stdout
Введите x, y, z: w = inf