Tell me the entire function to calculate square root of any integer without using any library function?
Anonymous
public static double sqrt(int num){ double t; double sq = num/2; do{ t = sq; sq = (t+(num/t)) / 2; } while((t-sq) != 0); return sq; }
Check out your Company Bowl for anonymous work chats.