Add files

This commit is contained in:
2026-02-28 12:27:14 +01:00
commit 31586db850
7 changed files with 94 additions and 0 deletions

View File

@@ -0,0 +1,32 @@
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_is_positive.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: Syxpi <admin@syxpi.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2026/02/28 12:12:07 by Syxpi #+# #+# */
/* Updated: 2026/02/28 12:14:15 by Syxpi ### ########.fr */
/* */
/* ************************************************************************** */
#include <unistd.h>
void ft_is_positive(int nb)
{
char c;
if (nb >= 0)
c = 'P';
else
c = 'N';
write(1, &c, 1);
}
int main(void)
{
ft_is_positive(42);
ft_is_positive(-5);
write(1, "\n", 1);
return (0);
}

Binary file not shown.