c_basic_exo/ex2/ft_is_negative.c

27 lines
1.0 KiB
C

/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_is_negative.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: sgongas <sgongas@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2026/02/22 22:48:11 by sgongas #+# #+# */
/* Updated: 2026/02/22 23:12:21 by sgongas ### ########.fr */
/* */
/* ************************************************************************** */
#include <unistd.h>
void ft_is_negative(int n)
{
if (n < 0)
write(1, "N", 1);
else
write(1, "P", 1);
}
// int main(void)
// {
// ft_is_negative(-1);
// return (0);
// }