Paisen

while3

Sep 20th, 2020
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.25 KB | None | 0 0
  1. #include<stdio.h>
  2.  
  3. double a,b=0,c=0;
  4.  
  5. int main (){
  6.     printf("introduce el numero a sacar raiz\n");
  7.     scanf("%lf",&a);
  8.     b=a;
  9.     c=a/b;
  10. while(b!=c){
  11.     b=(0.5*((a/b)+b));
  12.     c=a/b;
  13.  
  14. }
  15. printf("\nLa raiz de este numero es: %lf",b);
  16.     return 0;
  17.    
  18.     }
Advertisement
Add Comment
Please, Sign In to add comment