commit
This commit is contained in:
29
C_00/git/ex03/ft_print_numbers.c
Normal file
29
C_00/git/ex03/ft_print_numbers.c
Normal file
@@ -0,0 +1,29 @@
|
||||
/* ************************************************************************** */
|
||||
/* */
|
||||
/* ::: :::::::: */
|
||||
/* ft_print_numbers.c :+: :+: :+: */
|
||||
/* +:+ +:+ +:+ */
|
||||
/* By: gbaconni <marvin@42lausanne.ch> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2021/08/05 13:15:47 by gbaconni #+# #+# */
|
||||
/* Updated: 2021/08/05 13:16:35 by gbaconni ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
#include <unistd.h>
|
||||
|
||||
void ft_print_numbers(void)
|
||||
{
|
||||
int start;
|
||||
int end;
|
||||
int i;
|
||||
|
||||
start = (int) '0';
|
||||
end = (int) '9';
|
||||
i = start;
|
||||
while (i <= end)
|
||||
{
|
||||
write(1, &i, 1);
|
||||
i++;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user