Files
42_INT_01_libft/testing/srcs/test_sqrt.c
2021-08-10 16:40:52 +02:00

16 lines
170 B
C

#include "libft.h"
/*
** return the square root of nb
** or the integer value of it
*/
int ft_sqrt(int nb)
{
int i;
i = 0;
while ((i*i) < nb)
i++;
return (i);
}