clear all
clc
close all
N = 30;
a = 4;
x = 10;

n = 1;
while n <= N - 1
      x = (1/2)*(x+a/x);
      n++;
end
x