fork download
  1. #include <stdio.h>
  2. #include <math.h>
  3.  
  4. int main(void) {
  5. // початкові дані
  6. double x = 1.54;
  7. double y = 3.26;
  8.  
  9. // результати
  10. double z;
  11. double f;
  12.  
  13. // обчислення z = 15 / (x + e^y)
  14. z = 15.0 / (x + exp(y));
  15.  
  16. // обчислення f = z^3 / (x + y * sqrt(x^2 + z^2))
  17. f = pow(z, 3) / (x + y * sqrt(x * x + z * z));
  18.  
  19. // виведення результатів
  20. printf("x = %.2f, y = %.2f\n", x, y);
  21. printf("z = %.4f\n", z);
  22. printf("f(x,y,z) = %.4f\n", f);
  23.  
  24. return 0;
  25. }
  26.  
Success #stdin #stdout 0s 5316KB
stdin
Standard input is empty
stdout
x = 1.54, y = 3.26
z = 0.5437
f(x,y,z) = 0.0234