Bloomberg interview question

Write an program to calculate the square root of an integer