% Estimate square root of number.
%  The number must be named A.
%  The answer will be returned in "RESULT".

L = A;
for k = 1 : 10
  W = A/L;
  L = (L+W)/2;
end
RESULT = L;

