37 lines
1.2 KiB
C
37 lines
1.2 KiB
C
|
/* ************************************************************************** */
|
||
|
/* */
|
||
|
/* ::: :::::::: */
|
||
|
/* 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++;
|
||
|
}
|
||
|
}
|