0
How we can find square root without using function??
3 odpowiedzi
+ 1
float xsqrt(float num)
{
float x, sqrt;
sqrt = num / 2;
x = 0;
while(sqrt != x){
x = sqrt;
sqrt = ( num/x + x) / 2;
}
return (sqrt);
}
0
hamed02121 yes.
but it's better to use functions to avoid writing twice.
0
Can you define your logic??
Please.