Domanda di colloquio di Addnode Group

write a program to find out square root of a no without using library function

Risposta di colloquio

Anonimo

1 feb 2018

public static double sqrt(int number) { double t; double squareRoot = number / 2; do { t = squareRoot; squareRoot = (t + (number / t)) / 2; } while ((t - squareRoot) != 0); return squareRoot; }