mirror of
https://github.com/DavidGailleton/42-Push_Swap.git
synced 2026-01-27 00:41:57 +00:00
Bench algo working
This commit is contained in:
24
ft_putnbr.c
Normal file
24
ft_putnbr.c
Normal file
@@ -0,0 +1,24 @@
|
||||
/* ************************************************************************** */
|
||||
/* */
|
||||
/* ::: :::::::: */
|
||||
/* ft_putnbr.c :+: :+: :+: */
|
||||
/* +:+ +:+ +:+ */
|
||||
/* By: dgaillet <dgaillet@student.42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2026/01/08 15:17:28 by dgaillet #+# #+# */
|
||||
/* Updated: 2026/01/08 15:19:30 by dgaillet ### ########lyon.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
#include "push_swap.h"
|
||||
|
||||
void ft_putnbr_fd(int nbr, int fd)
|
||||
{
|
||||
char c;
|
||||
|
||||
if (!nbr)
|
||||
return ;
|
||||
ft_putnbr_fd(nbr / 10, fd);
|
||||
c = (nbr % 10) + '0';
|
||||
secure_write(fd, &c, 1);
|
||||
}
|
||||
Reference in New Issue
Block a user