0
0
This commit is contained in:
Guy Baconniere
2021-08-20 10:02:38 +02:00
parent 5aa02c94b5
commit d30270c485
354 changed files with 0 additions and 0 deletions

View File

@@ -0,0 +1,24 @@
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_is_negative.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: gbaconni <marvin@42lausanne.ch> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2021/08/05 13:18:29 by gbaconni #+# #+# */
/* Updated: 2021/08/05 13:45:21 by gbaconni ### ########.fr */
/* */
/* ************************************************************************** */
#include <unistd.h>
void ft_is_negative(int n)
{
char c;
if (n < 0)
c = 'N';
else
c = 'P';
write(1, &c, 1);
}

23
C_00/git/ex04/main.c Normal file
View File

@@ -0,0 +1,23 @@
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* main.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: gbaconni <marvin@42lausanne.ch> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2021/08/05 13:18:40 by gbaconni #+# #+# */
/* Updated: 2021/08/05 13:48:41 by gbaconni ### ########.fr */
/* */
/* ************************************************************************** */
#include <stdio.h>
int main(void)
{
void ft_is_negative(int n);
ft_is_negative(-42);
ft_is_negative(42);
ft_is_negative(0);
return (0);
}

6
C_00/git/ex04/main.sh Executable file
View File

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