Skip to content

Commit

Permalink
Merge pull request #2 from Savapitech/m_putnbr
Browse files Browse the repository at this point in the history
add: adding my_put_nbr.c
  • Loading branch information
MarcAgen authored Oct 23, 2024
2 parents 5f4160e + ffce692 commit 84d0e85
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 6 deletions.
22 changes: 22 additions & 0 deletions src/handler/my_put_nbr.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
/*
** EPITECH PROJECT, 2024
** my_put_nbr
** File description:
** display the number given as parameter
*/
#include "../include/libmy.h"

int my_put_nbr(int nb)
{
if (nb < 0) {
my_putchar('-');
nb *= -1;
}
if (nb < 10) {
my_putchar(nb + '0');
} else {
my_put_nbr(nb / 10);
my_putchar(nb % 10 +'0');
}
return 0;
}
6 changes: 0 additions & 6 deletions src/handler/point_hexa.c

This file was deleted.

0 comments on commit 84d0e85

Please sign in to comment.