diff --git a/print_grid.c b/print_grid.c new file mode 100644 index 0000000..1c21969 --- /dev/null +++ b/print_grid.c @@ -0,0 +1,17 @@ +#include + +void printGrid(int grid[9][9]) { + int i, j; + for (i = 0; i < 9; i++) { + for (j = 0; j < 9; j++) { + printf("%2d ", grid[i][j]); + if ((j + 1) % 3 == 0 && j < 8) { + printf("| "); + } + } + printf("\n"); + if ((i + 1) % 3 == 0 && i < 8) { + printf("-----------------------\n"); + } + } +}