View Code of Problem 74

#include<stdio.h>
int main(){
float x;
  scanf("%f",&x);
  float b,a=1.0;
  while(fabs(b-a)>=1.0e-5){
    b=(a+x/a)/2.0;
    a=b;
  }
  printf("%.3f",a);
  return 0;
}

Double click to view unformatted code.


Back to problem 74