Bonus preparartion
This commit is contained in:
21
bonus/print_unsigned_bonus.c
Normal file
21
bonus/print_unsigned_bonus.c
Normal file
@@ -0,0 +1,21 @@
|
||||
/* ************************************************************************** */
|
||||
/* */
|
||||
/* ::: :::::::: */
|
||||
/* print_unsigned_bonus.c :+: :+: :+: */
|
||||
/* +:+ +:+ +:+ */
|
||||
/* By: dgaillet <dgaillet@student.42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2025/11/17 12:26:23 by dgaillet #+# #+# */
|
||||
/* Updated: 2025/11/19 13:36:08 by dgaillet ### ########lyon.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
#include "ft_printf_bonus.h"
|
||||
#include <unistd.h>
|
||||
|
||||
int print_unsigned(unsigned int nbr)
|
||||
{
|
||||
if (nbr == 0)
|
||||
return (write(1, "0", 1));
|
||||
return (ft_putnbr_base(nbr, "0123456789", 10));
|
||||
}
|
||||
Reference in New Issue
Block a user