mirror of
https://github.com/Ladebeze66/Piscine42.git
synced 2026-11-09 13:17:16 +01:00
Piscine42
This commit is contained in:
18
C00/ex00/ft_putchar.c
Executable file
18
C00/ex00/ft_putchar.c
Executable file
@@ -0,0 +1,18 @@
|
||||
/* ************************************************************************** */
|
||||
/* */
|
||||
/* ::: :::::::: */
|
||||
/* ft_putchar.c :+: :+: :+: */
|
||||
/* +:+ +:+ +:+ */
|
||||
/* By: fgras-ca <marvin@42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2022/11/30 20:24:47 by fgras-ca #+# #+# */
|
||||
/* Updated: 2022/12/01 17:49:23 by fgras-ca ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
#include <unistd.h>
|
||||
|
||||
void ft_putchar(char c)
|
||||
{
|
||||
write(1, &c, 1);
|
||||
}
|
||||
18
C00/ex01/ft_print_alphabet.c
Executable file
18
C00/ex01/ft_print_alphabet.c
Executable file
@@ -0,0 +1,18 @@
|
||||
/* ************************************************************************** */
|
||||
/* */
|
||||
/* ::: :::::::: */
|
||||
/* ft_print_alphabet.c :+: :+: :+: */
|
||||
/* +:+ +:+ +:+ */
|
||||
/* By: fgras-ca <marvin@42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2022/11/30 20:35:41 by fgras-ca #+# #+# */
|
||||
/* Updated: 2022/12/01 19:28:23 by fgras-ca ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
#include <unistd.h>
|
||||
|
||||
void ft_print_alphabet(void)
|
||||
{
|
||||
write(1, "abcdefghijklmnopqrstuvwxyz", 26);
|
||||
}
|
||||
18
C00/ex02/ft_print_reverse_alphabet.c
Executable file
18
C00/ex02/ft_print_reverse_alphabet.c
Executable file
@@ -0,0 +1,18 @@
|
||||
/* ************************************************************************** */
|
||||
/* */
|
||||
/* ::: :::::::: */
|
||||
/* ft_print_reverse_alphabet.c :+: :+: :+: */
|
||||
/* +:+ +:+ +:+ */
|
||||
/* By: fgras-ca <marvin@42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2022/12/01 19:21:48 by fgras-ca #+# #+# */
|
||||
/* Updated: 2022/12/01 19:27:48 by fgras-ca ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
#include <unistd.h>
|
||||
|
||||
void ft_print_reverse_alphabet(void)
|
||||
{
|
||||
write(1, "zyxwvutsrqponmlkjihgfedcba", 26);
|
||||
}
|
||||
18
C00/ex03/ft_print_numbers.c
Executable file
18
C00/ex03/ft_print_numbers.c
Executable file
@@ -0,0 +1,18 @@
|
||||
/* ************************************************************************** */
|
||||
/* */
|
||||
/* ::: :::::::: */
|
||||
/* ft_print_numbers.c :+: :+: :+: */
|
||||
/* +:+ +:+ +:+ */
|
||||
/* By: fgras-ca <marvin@42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2022/12/01 19:36:44 by fgras-ca #+# #+# */
|
||||
/* Updated: 2022/12/02 11:52:51 by fgras-ca ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
#include <unistd.h>
|
||||
|
||||
void ft_print_numbers(void)
|
||||
{
|
||||
write(1, "0123456789", 10);
|
||||
}
|
||||
25
C00/ex04/ft_is_negative.c
Executable file
25
C00/ex04/ft_is_negative.c
Executable file
@@ -0,0 +1,25 @@
|
||||
/* ************************************************************************** */
|
||||
/* */
|
||||
/* ::: :::::::: */
|
||||
/* ft_is_negative.c :+: :+: :+: */
|
||||
/* +:+ +:+ +:+ */
|
||||
/* By: fgras-ca <marvin@42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2022/12/01 19:42:52 by fgras-ca #+# #+# */
|
||||
/* Updated: 2022/12/02 11:57:31 by fgras-ca ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
#include <unistd.h>
|
||||
|
||||
void ft_is_negative(int n)
|
||||
{
|
||||
if (n < 0)
|
||||
{
|
||||
write(1, "N", 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
write(1, "P", 1);
|
||||
}
|
||||
}
|
||||
BIN
C00/fr.subject .pdf
Normal file
BIN
C00/fr.subject .pdf
Normal file
Binary file not shown.
Reference in New Issue
Block a user