Skip to content

Latest commit

 

History

History

ex08

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

ft_is_negative.c

This function takes a number (let's call it n) as input. It checks whether n is negative or not.

  • If n is less than 0, it means it's negative. In that case, the function prints 'N'.
  • If n is greater than or equal to 0, it means it's positive or zero. In that case, the function prints 'P'.

So, in essence, this function determines the sign of the given number and prints 'N' for negative numbers and 'P' for non-negative numbers.