piscine/c00/ex04/ft_is_negative.c
Willem Haffmans 607ce08c18 all
2024-09-10 00:18:01 +02:00

33 lines
1.1 KiB
C

/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_is_negative.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: whaffman <whaffman@student.codam.nl> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/06/04 14:16:23 by whaffman #+# #+# */
/* Updated: 2024/06/05 11:46:39 by whaffman ### ########.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(-3);
ft_is_negative(2);
return (0);
}
*/