Advertisement
ppupil2

Q2.1-PRF192-PE-trial

Mar 27th, 2020
183
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.19 KB | None | 0 0
  1. double fen(double x, double epsi) {
  2.     double si,a; int n;
  3.     si = x; n = 1; a = x;
  4.     while (epsi < fabs(a)) {
  5.         a *= (-1) * pow(x,2) / (2*n*(2*n+1));
  6.         si += a;
  7.         n++;
  8.     }
  9.     return (si);   
  10. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement