/* ************************************************************************** */
/*                                                                            */
/*                                                        :::      ::::::::   */
/*   ft_boolean.h                                       :+:      :+:    :+:   */
/*                                                    +:+ +:+         +:+     */
/*   By: jayang <[email protected]>                      +#+  +:+       +#+        */
/*                                                +#+#+#+#+#+   +#+           */
/*   Created: 2022/02/15 09:13:19 by jayang            #+#    #+#             */
/*   Updated: 2022/02/15 09:15:15 by jayang           ###   ########.fr       */
/*                                                                            */
/* ************************************************************************** */

#ifndef FT_BOOLEAN_H
# define FT_BOOLEAN_H

# include <unistd.h>
# define SUCCESS 0
# define TRUE 1
# define FALSE 0
# define EVEN_MSG "I have an even number of arguments.\\n"
# define ODD_MSG "I have an odd number of arguments.\\n"
# define EVEN(a) (((a) % 2 == 0) ? (1) : (0))

typedef int	t_bool;

#endif
int main(int argc, char **argv)
{
	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);
}