Done
This commit is contained in:
parent
ace1cfe04e
commit
4244f82bbb
|
@ -0,0 +1,48 @@
|
||||||
|
/* ************************************************************************** */
|
||||||
|
/* */
|
||||||
|
/* ::: :::::::: */
|
||||||
|
/* print_array.c :+: :+: :+: */
|
||||||
|
/* +:+ +:+ +:+ */
|
||||||
|
/* By: akarami <akarami@student.42.fr> +#+ +:+ +#+ */
|
||||||
|
/* +#+#+#+#+#+ +#+ */
|
||||||
|
/* Created: 2023/03/25 17:15:08 by akarami #+# #+# */
|
||||||
|
/* Updated: 2023/03/25 18:15:52 by akarami ### ########.fr */
|
||||||
|
/* */
|
||||||
|
/* ************************************************************************** */
|
||||||
|
|
||||||
|
#include <unistd.h>
|
||||||
|
|
||||||
|
void ft_putchar(char c)
|
||||||
|
{
|
||||||
|
write(1, &c, 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
void ft_print_arrays(int arr_matrix, int size)
|
||||||
|
{
|
||||||
|
int x;
|
||||||
|
int y;
|
||||||
|
|
||||||
|
x = 1;
|
||||||
|
while(x <= size)
|
||||||
|
{
|
||||||
|
y = 1;
|
||||||
|
while (y <= size)
|
||||||
|
{
|
||||||
|
ft_putchar(arr_matrix[x][y] + '0');
|
||||||
|
if (y != size)
|
||||||
|
{
|
||||||
|
ft_putchar('');
|
||||||
|
}
|
||||||
|
y++;
|
||||||
|
}
|
||||||
|
x++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
int main(int ac, char** av)
|
||||||
|
{
|
||||||
|
int arr_matrix;
|
||||||
|
int size;
|
||||||
|
|
||||||
|
ft_print_arrays(arr_matrix, size);
|
||||||
|
}
|
Loading…
Reference in New Issue