From fde718bf29799f9df56c3923da163ca29af6bf20 Mon Sep 17 00:00:00 2001 From: pjc97uv2f <1291955673@qq.com> Date: Sat, 9 Nov 2024 01:09:47 +0800 Subject: [PATCH] =?UTF-8?q?Add=20=E7=AC=AC=E4=BA=8C=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 第二题 | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 第二题 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