40 lines
1.3 KiB
C
40 lines
1.3 KiB
C
|
/* ************************************************************************** */
|
||
|
/* */
|
||
|
/* ::: :::::::: */
|
||
|
/* main.c :+: :+: :+: */
|
||
|
/* +:+ +:+ +:+ */
|
||
|
/* By: cchauvet <cchauvet@student.42angoulem +#+ +:+ +#+ */
|
||
|
/* +#+#+#+#+#+ +#+ */
|
||
|
/* Created: 2022/07/24 19:36:07 by cchauvet #+# #+# */
|
||
|
/* Updated: 2022/07/24 20:19:00 by cchauvet ### ########.fr */
|
||
|
/* */
|
||
|
/* ************************************************************************** */
|
||
|
|
||
|
void ft_print(int *tab, int size);
|
||
|
int *ft_gen(int size);
|
||
|
int *ft_input(char *str);
|
||
|
void *ft_printf(char *str);
|
||
|
int *ft_verif(int *tab_user, int *tab_gen, int size)
|
||
|
|
||
|
int main(int argc, char **argv)
|
||
|
{
|
||
|
int *gen_tab;
|
||
|
int *user_tab;
|
||
|
|
||
|
if (argc != 2)
|
||
|
{
|
||
|
ft_printf("error");
|
||
|
return (0);
|
||
|
}
|
||
|
user_tab = ft_input(argv[1]);
|
||
|
if (user_tab[0] == 0)
|
||
|
{
|
||
|
ft_printf("error");
|
||
|
return (0);
|
||
|
}
|
||
|
gen_tab = ft_gen(4);
|
||
|
ft_verif(gen_tab, user_tab, 4);
|
||
|
ft_print(gen_tab, 4);
|
||
|
return (1);
|
||
|
}
|