diff --git a/第二题 b/第二题 new file mode 100644 index 0000000..68d52d9 --- /dev/null +++ b/第二题 @@ -0,0 +1,47 @@ +#include +#define SIZE 9 +void printSudoku(int board[SIZE][SIZE]); +int main() +{ + int board[SIZE][SIZE]={{5,3,0,0,7,0,0,0,0}, + {6,0,0,1,9,5,0,0,0}, + {0,9,8,0,0,0,0,6,0}, + {8,0,0,0,6,0,0,0,3}, + {4,0,0,8,0,3,0,0,1}, + {7,0,0,0,2,0,0,0,6}, + {0,6,0,0,0,0,2,8,0}, + {0,0,0,4,1,9,0,0,5}, + {0,0,0,0,8,0,0,7,9}}; + printSudoku(board); + return 0; +} +void printSudoku(int board[SIZE][SIZE]) +{ + for (int i=0;i