+ 1
Whts the logic of this code????
float xsqrt(float num) { float x, sqrt; sqrt = num / 2; x = 0; while(sqrt != x){ x = sqrt; sqrt = ( num/x + x) / 2; } return (sqrt); }
1 Odpowiedź
float xsqrt(float num) { float x, sqrt; sqrt = num / 2; x = 0; while(sqrt != x){ x = sqrt; sqrt = ( num/x + x) / 2; } return (sqrt); }