diff options
Diffstat (limited to 'rush/testy.c')
| -rw-r--r-- | rush/testy.c | 73 |
1 files changed, 73 insertions, 0 deletions
diff --git a/rush/testy.c b/rush/testy.c new file mode 100644 index 0000000..8f3b8ab --- /dev/null +++ b/rush/testy.c @@ -0,0 +1,73 @@ +// void max_search_y(int m[4][4]) +// { +// int x; +// x = 0; + +// while (x < 4) +// { +// int y; +// y = 0; + +// while (y < 4) +// if (y >= (t - 1) && y <= (4 - u)) +// change_to_max2(&matrix[y][x]); +// y++; +// } +// x++; +// } +#include <unistd.h> +void change_to_4(int *y) +{ + + *y = 4; + +} + +void ft_putchar(char c) +{ + write(1, &c ,1); +} + +int main(void) +{ + int matrix[4][4] = {{0}}; + + int b; + b = 0; + + int t; + int u; + + t = 2; + u = 2; + + while (b < 4) + { + if (b >= (t - 1) && b <= (4 - u)) + change_to_4(&matrix[b][0]); + b++; + } + + 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++; + } + + // while (b < 4) + // { + // if (b >= (t - 1) && b <= (4 - u)) + // change_to_max2(&matrix[b][1]); + // b++; + // } +}
\ No newline at end of file |
