Piscine42/C00/ex04/ft_is_negative.c
2023-12-12 17:25:55 +01:00

26 lines
1014 B
C
Executable File

/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_is_negative.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: fgras-ca <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2022/12/01 19:42:52 by fgras-ca #+# #+# */
/* Updated: 2022/12/02 11:57:31 by fgras-ca ### ########.fr */
/* */
/* ************************************************************************** */
#include <unistd.h>
void ft_is_negative(int n)
{
if (n < 0)
{
write(1, "N", 1);
}
else
{
write(1, "P", 1);
}
}