Files
C-Programming-Fundamentals/ex4/ft_is_negative.c
lclerel- lclerel- b0619b473c Update
2026-03-04 14:05:17 +01:00

29 lines
1.0 KiB
C

/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_is_negative.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: lclerel- <lclerel-@learner.42.tech> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2026/03/04 10:08:57 by lclerel- #+# #+# */
/* Updated: 2026/03/04 13:06:23 by lclerel- ### ########.fr */
/* */
/* ************************************************************************** */
#include <unistd.h>
void ft_is_negative(int nb)
{
char c;
if (nb >= 0)
{
c = 'P';
}
else
{
c = 'N';
}
write(1, &c, 1);
}