if 문을 통해서 해당 숫자가 0보다 작으면 N, 아니면 P
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_is_negative.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: sungjpar <[email protected].> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2022/02/02 17:45:56 by sungjpar #+# #+# */
/* Updated: 2022/02/02 17:46:54 by sungjpar ### ########.fr */
/* */
/* ************************************************************************** */
#include <unistd.h>
void ft_is_negative(int n);
void ft_is_negative(int n)
{
if (n < 0)
write(1, "N", 1);
else
write(1, "P", 1);
}
void ft_is_negative(int n);
int main(void)
{
int i;
int j;
int k;
i = -2147483648;
j = 0;
k = 2147483647;
ft_is_negative(i);
ft_is_negative(j);
ft_is_negative(k);
}