ajout abs, greater, smaller, sign
This commit is contained in:
8
srcs/ft_abs.c
Normal file
8
srcs/ft_abs.c
Normal file
@@ -0,0 +1,8 @@
|
||||
#include "libft.h"
|
||||
|
||||
int ft_abs(int n)
|
||||
{
|
||||
if (n < 0)
|
||||
n *= -1;
|
||||
return (n);
|
||||
}
|
||||
Reference in New Issue
Block a user