This commit is contained in:
lclerel- lclerel-
2026-03-04 14:05:17 +01:00
commit b0619b473c
6 changed files with 110 additions and 0 deletions

28
ex4/ft_is_negative.c Normal file
View File

@@ -0,0 +1,28 @@
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* 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);
}