-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathft_abs.c
20 lines (18 loc) · 974 Bytes
/
ft_abs.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_abs.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: lrocca <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2021/09/24 13:14:41 by lrocca #+# #+# */
/* Updated: 2021/09/24 13:26:52 by lrocca ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
int ft_abs(int n)
{
if (n < 0)
return (-n);
return (n);
}