35 lines
1.2 KiB
C
35 lines
1.2 KiB
C
/* ************************************************************************** */
|
|
/* */
|
|
/* ::: :::::::: */
|
|
/* main.c :+: :+: :+: */
|
|
/* +:+ +:+ +:+ */
|
|
/* By: jhalford <marvin@42.fr> +#+ +:+ +#+ */
|
|
/* +#+#+#+#+#+ +#+ */
|
|
/* Created: 2016/08/08 14:46:34 by jhalford #+# #+# */
|
|
/* Updated: 2016/08/11 11:21:42 by jhalford ### ########.fr */
|
|
/* */
|
|
/* ************************************************************************** */
|
|
|
|
#include "ft_boolean.h"
|
|
#include <unistd.h>
|
|
|
|
void ft_putstr(char *str)
|
|
{
|
|
while (*str)
|
|
write(1, str++, 1);
|
|
}
|
|
|
|
t_bool ft_is_even(int nbr)
|
|
{
|
|
return ((EVEN(nbr)) ? TRUE : FALSE);
|
|
}
|
|
|
|
int main(int argc, char **argv)
|
|
{
|
|
(void)argv;
|
|
if (ft_is_even(argc - 1) == TRUE)
|
|
ft_putstr(EVEN_MSG);
|
|
else
|
|
ft_putstr(ODD_MSG);
|
|
return (SUCCESS);
|
|
}
|