#include void change_to_max(int x[4], int left, int right) { int i; i = 0; while (i < 4) { if (left == 1) x[0] = 4; else if (right == 1) x[3] = 4; else if (i >= (left - 1) && i <= (4 - right)) x[i] = 4; i++; } } void ft_putchar(char c) { write(1, &c ,1); } int main(void) { int matrix[4][4] = {{0}}; int str[16] = {3, 3, 1, 2, 1, 2, 2, 3, 2, 3, 2, 1, 2, 1, 2, 3}; int a; int e; int g; a = 0; e = 12; g = 8; while (a < 4) { change_to_max(matrix[a], str[g], str[e]); g++; e++; a++; } int i; int j; i = 0; while (i <= 3) { j = 0; while (j <= 3) { ft_putchar(matrix[i][j] + '0'); j++; } ft_putchar(0x0a); i++; } int matrix2[4][4] = {{0}}; }