diff --git a/ex04/ft_is_negative.c b/ex04/ft_is_negative.c new file mode 100644 index 0000000..a3b7f2d --- /dev/null +++ b/ex04/ft_is_negative.c @@ -0,0 +1,35 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* ft_print_reverse_alphabet.c :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: tischmid +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2023/03/15 21:50:37 by tischmid #+# #+# */ +/* Updated: 2023/03/16 05:00:01 by tischmid ### ########.fr */ +/* */ +/* ************************************************************************** */ + +#include + +void ft_is_negative(int n) +{ + if (n < 0) + { + write(1, "N", 1); + } + else + { + write(1, "P", 1); + } +} + +/* //// +int main(void) +{ + ft_is_negative(5); + ft_is_negative(0); + ft_is_negative(-5); + return (0); +} +*/ ////