1
0

first commit

This commit is contained in:
KeyZox
2023-08-06 20:12:38 +02:00
parent 1fe062c970
commit eb6b113e51
125 changed files with 2987 additions and 0 deletions

View File

@ -0,0 +1,5 @@
#include <stdio.h>
int main(void)
{
printf("%d", ft_strlen("ffff"));
}

View File

@ -0,0 +1,4 @@
int main(void)
{
ft_putstr("fff");
}

View File

@ -0,0 +1,36 @@
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_putnbr.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: ajoly <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2022/07/25 13:03:53 by ajoly #+# #+# */
/* Updated: 2022/07/25 13:03:55 by ajoly ### ########.fr */
/* */
/* ************************************************************************** */
#include <unistd.h>
void ft_putnbr(int nb)
{
long nb_long;
int nb_temp;
int div;
nb_long = nb;
div = 1;
if(nb_long < 0)
{
write(1, "-", 1);
nb_long *= -1;
}
while (nb_long / 10 >= div)
div *= 10;
while (div >= 1)
{
nb_temp = (nb_long / div) + 48;
write(1, &nb_temp, 1);
nb_long = nb_long % div;
div = div / 10;
}
}

View File

@ -0,0 +1,5 @@
#include <stdio.h>
int main()
{
printf("%d\n", ft_atoi(" ---+-++123jkjh54984"));
}

View File

@ -0,0 +1,4 @@
int main(void)
{
ft_putnbr_base(126, "0123456789abcdef");
}