0
0

Add main.* and remove .gitignore

This commit is contained in:
2021-08-16 08:26:30 +02:00
parent a808b91a50
commit 44692816d5
85 changed files with 1352 additions and 30 deletions

View File

@@ -0,0 +1,38 @@
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* main.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: gbaconni <marvin@42lausanne.ch> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2021/08/09 13:38:52 by gbaconni #+# #+# */
/* Updated: 2021/08/09 17:02:02 by gbaconni ### ########.fr */
/* */
/* ************************************************************************** */
#include <stdio.h>
#include <unistd.h>
void ft_rev_int_tab(int *tab, int size);
int main(void)
{
int tab5[5];
int tab2[2];
tab5[0] = 1;
tab5[1] = 2;
tab5[2] = 3;
tab5[3] = 4;
tab5[4] = 5;
tab2[0] = 1;
tab2[1] = 2;
printf("%d,%d,%d,%d,%d\n", tab5[0], tab5[1], tab5[2], tab5[3], tab5[4]);
ft_rev_int_tab(tab5, 5);
printf("%d,%d,%d,%d,%d\n", tab5[0], tab5[1], tab5[2], tab5[3], tab5[4]);
printf("%d,%d\n", tab2[0], tab2[1]);
ft_rev_int_tab(tab2, 2);
printf("%d,%d\n", tab2[0], tab2[1]);
ft_rev_int_tab(tab2, 2);
return (0);
}

View File

@@ -0,0 +1,7 @@
#!/bin/sh
set -e
norminette -R CheckForbiddenSourceHeader ft_*.c
gcc -Wall -Wextra -Werror -o a.out *.c
echo $(basename $PWD):
./a.out
rm -f a.out