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