Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <math.h>
- #define eps 1e-6
- int main(void)
- {
- int i;
- double x=0, y, delta;
- do
- {
- y=cos(x);
- delta=fabs(y-x);
- x=y;
- printf("cos(%lf)=%lf \n",x,cos(x));
- } while (delta > eps);
- // printf("cos(%lf)=%lf \n",x,cos(x));
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement