Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- #include <math.h>
- int main()
- {
- double c, eps, x, x1, x2;
- printf("Wczytaj c = ");
- scanf("%f\n", &c);
- printf("Wczytaj eps = ");
- scanf("%f\n", &eps);
- x1 = c;
- x2 = (1/2) * ( x1 + (c / x1) );
- if ( fabs(x1 - x2) < eps)
- {
- x =
- }
- else
- {
- x1 = x2;
- x2 = (1/2) * ( x1 + (c / x1));
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement