0
0
This commit is contained in:
2021-08-17 19:59:45 +02:00
parent 6e576f39ca
commit 42df274074
10 changed files with 197 additions and 1 deletions

View File

@@ -0,0 +1,24 @@
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_sqrt.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: gbaconni <gbaconni@student.42lausan> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2021/08/17 17:09:01 by gbaconni #+# #+# */
/* Updated: 2021/08/17 18:28:10 by gbaconni ### ########.fr */
/* */
/* ************************************************************************** */
int ft_sqrt(int nb)
{
int i;
i = 0;
while (i * i < nb)
i++;
if (nb % i == 0)
return (i);
else
return (0);
}