init
This commit is contained in:
25
C/c00/ex04/ft_is_negative.c
Normal file
25
C/c00/ex04/ft_is_negative.c
Normal file
@ -0,0 +1,25 @@
|
||||
/* ************************************************************************** */
|
||||
/* */
|
||||
/* ::: :::::::: */
|
||||
/* ft_is_negative.c :+: :+: :+: */
|
||||
/* +:+ +:+ +:+ */
|
||||
/* By: cchauvet <marvin@42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2022/07/14 14:14:39 by cchauvet #+# #+# */
|
||||
/* Updated: 2022/07/14 14:51:31 by cchauvet ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
#include <unistd.h>
|
||||
|
||||
void ft_is_negative(int n)
|
||||
{
|
||||
char a;
|
||||
|
||||
a = 'N';
|
||||
if (n > 0)
|
||||
{
|
||||
a = 'P';
|
||||
}
|
||||
write(1, &a, 1);
|
||||
}
|
Reference in New Issue
Block a user