creation du main de testing et du test de abs
This commit is contained in:
15
testing/srcs/test_sqrt.c
Normal file
15
testing/srcs/test_sqrt.c
Normal file
@@ -0,0 +1,15 @@
|
||||
#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);
|
||||
}
|
||||
Reference in New Issue
Block a user