Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdlib.h>
- #include <stdio.h>
- #include <math.h>
- double racine(double n);
- int main()
- {
- printf("%f\n", racine(4.000));
- return 0;
- }
- double racine(double n)
- {
- double u = n;
- while (u*u-n > 0.0001)
- {
- u = ( 1 / 2 ) * (u + n / u);
- }
- return u;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement