int ft_check_av_entree(int ac, char **av)
{
    int i;

    i = 0;
    while (av[1][i] != '\0')
        {
            if (av[1][i] >= '1' && av[1][i] <= '4' && (i % 2 == 0))
            {
                i++;
            }
            else if (av[1][i] == ' ' && (i % 2 == 1))
            {
                i++;
            }
            else
            {
                return (0);
            }
        }
    if (ac == 2 && ft_strlen(av[1]) == 31)
    {
        return (1);
    }
    return (0)
}

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: