Special algorithm for square roots based on Newton's method

a  =  2
Clear[x]
x[0]  =  a
x[n]  =  x[n_]  :=  
        N[(1/2) (x[n - 1]  +   a/x[n - 1])]

For[n = 0,  n ≤  10,  n++,  Print[x[n]]]

SqrtAlgorithm[a_]  :=  
      Module[{x, j}, 
x[0]  =  
          a; 
x[n]  =  x[n_]  :=  
            N[(1/2) (x[n - 1]  +   a/
                      x[n - 1])]; 
j  =  
          1; 
While[
          Abs[x[j]  -  x[j - 1]]  >  1/10^6,  
Print[
            x[j]]; 
j++]; 
x[
          j]
]

SqrtAlgorithm[2]

SqrtAlgorithm[3]