1
0
This repository has been archived on 2024-10-25. You can view files and clone it, but cannot push or open issues or pull requests.
42-2nd-piscine/finish/rush01/ex00/print_double_tab.c

37 lines
1.2 KiB
C
Raw Normal View History

2023-08-03 23:16:27 +02:00
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* print_double_tab.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: ale-gal <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2023/07/22 11:42:20 by ale-gal #+# #+# */
/* Updated: 2023/07/22 16:51:52 by ale-gal ### ########.fr */
/* */
/* ************************************************************************** */
#include <unistd.h>
void ft_print_double_tab(int **tab, int size)
{
int i_x;
int i_y;
char chr;
i_y = 0;
while (i_y < size)
{
i_x = 0;
while (i_x < size)
{
chr = '0' + tab[i_y][i_x];
write(1, &chr, 1);
if (i_x != size - 1)
write(1, " ", 1);
i_x++;
}
write(1, "\n", 1);
i_y++;
}
}