View Code of Problem 74

#include<stdio.h>
int main(){
	double x,x1,a;
	scanf("%lf",&a);
	x=a/2;
	while(fabs(x-x1)>=0.00001){
		x1=x;
		x=(x1+a/x1)/2;
	}
	printf("%.3lf",x);
	return 0;
}

Double click to view unformatted code.


Back to problem 74