From f07c3627a64d762976f54cd987e556a368c57596 Mon Sep 17 00:00:00 2001 From: psoyatper Date: Sun, 29 Oct 2023 09:45:02 +0800 Subject: [PATCH] ADD file via upload --- output.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 output.c diff --git a/output.c b/output.c new file mode 100644 index 0000000..10b3a4e --- /dev/null +++ b/output.c @@ -0,0 +1,19 @@ +#include + +void output(int board[9][9]){ + int i; + for(i = 0;i < 9 ;i++){ + if(i %3 == 0){ + printf("|-----------------------|\n"); + } + printf("| %d %d %d | %d %d %d | %d %d %d |\n", + board[i][0],board[i][1],board[i][2],board[i][3],board[i][4],board[i][5],board[i][6],board[i][7],board[i][8]); + } + printf("|-----------------------|\n"); +} + +int main(){ + int board[9][9] = {0}; + output(board); + return 0; +} \ No newline at end of file