_strangeman

lab1

Nov 4th, 2014
184
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.36 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <math.h>
  3.  
  4. int main()
  5. {
  6.     double x, y, a, b, p;
  7.     x = 1.25;
  8.     y = 0.93;
  9.     a = ((x - y) * ((((x + y) * (x + y)) / ((x + 4)*(x + 4)*(x + 4))) / ((exp(-(x-2))) + (x*x*x + 4))));
  10.     b = (1 + cos(y - 2)) / ((pow (x,(2/4))) + sin(y - 2) * sin(y - 2));
  11.     p = a / b;
  12.     printf("p value is: %lf when x = %lf and y = %lf\n", p, x, y);
  13.     return 0;
  14. }
Advertisement
Add Comment
Please, Sign In to add comment