25 lines
1,015 B
C
25 lines
1,015 B
C
|
/* ************************************************************************** */
|
||
|
/* */
|
||
|
/* ::: :::::::: */
|
||
|
/* ft_sqrt.c :+: :+: :+: */
|
||
|
/* +:+ +:+ +:+ */
|
||
|
/* By: gtertysh <marvin@42.fr> +#+ +:+ +#+ */
|
||
|
/* +#+#+#+#+#+ +#+ */
|
||
|
/* Created: 2016/10/29 17:56:37 by gtertysh #+# #+# */
|
||
|
/* Updated: 2016/10/29 21:53:31 by gtertysh ### ########.fr */
|
||
|
/* */
|
||
|
/* ************************************************************************** */
|
||
|
|
||
|
int ft_sqrt(int numb)
|
||
|
{
|
||
|
int i;
|
||
|
|
||
|
i = 0;
|
||
|
while (i * i < nb)
|
||
|
i++;
|
||
|
if (i * i == nb)
|
||
|
return (i);
|
||
|
else
|
||
|
return (0);
|
||
|
}
|