Square root approximations, implemented two ways
In version 1, you are testing the difference of the square is within 0.001. 

The square root of 9.001 is 3.000167 

In version 2, you are testing the difference of the square root part. When you square it, the error becomes bigger.

The square of 3.001 is 9.006001

One error:

You need to get rid of the 

if(guess*guess-n&lt;epsilon)


at the end of version 2, it will not print for positive differences > 0.001 e.g. for 3.001 9.006001 is 0.00601 bigger.