Merge pull request '第一题实现.c' (#2) from pmfsq5yrv/sudoku_valider:main into main
commit
bb7e19f87a
@ -0,0 +1,17 @@
|
||||
#include <stdio.h>
|
||||
|
||||
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");
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in new issue