From da88954bc3f3f0a32241de6e27060046e7547c52 Mon Sep 17 00:00:00 2001 From: Li Yanxiao Date: Fri, 3 Nov 2023 12:38:28 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=B5=8B=E8=AF=95=E8=BE=93?= =?UTF-8?q?=E5=87=BA=E7=9F=A9=E9=98=B5=E7=9A=84=E5=87=BD=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/main.c b/main.c index 3a91a1e..322d9f9 100644 --- a/main.c +++ b/main.c @@ -2,6 +2,24 @@ #include +/** + * @brief 测试输出数独矩阵 + */ +void testPrintMatrix(){ + int array[9][9] = {{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}}; + SudokuMatrix* matrix = CreateMatrixFromArray(array); + PrintMatrix(matrix); + DeleteMatrix(matrix); +} + /** * @brief 测试随机生成数独矩阵 */