/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* ft_sqrt.c :+: :+: :+: */ /* +:+ +:+ +:+ */ /* By: bchanot +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2016/01/28 22:43:47 by bchanot #+# #+# */ /* Updated: 2018/10/11 23:12:24 by bchanot ### ########.fr */ /* */ /* ************************************************************************** */ #include "libft.h" size_t ft_sqrt(size_t nb) { size_t cpt; cpt = 0; if (nb == 0) return (false); while (cpt * cpt < nb) cpt++; return (cpt); }