From 8dde4cf73fb7379a3e90cb8bbe33a9404db8351d Mon Sep 17 00:00:00 2001 From: p56isruwj <3475735425@qq.com> Date: Mon, 6 Nov 2023 21:50:00 +0800 Subject: [PATCH] =?UTF-8?q?Delete=20'=E9=A2=98=E7=9B=AE2.cpp'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 题目2.cpp | 44 -------------------------------------------- 1 file changed, 44 deletions(-) delete mode 100644 题目2.cpp diff --git a/题目2.cpp b/题目2.cpp deleted file mode 100644 index 308e558..0000000 --- a/题目2.cpp +++ /dev/null @@ -1,44 +0,0 @@ -#include -#include -#include -int a[10][10]={0}; -void random() -{ - int i=1,j=1,x,y; - while(j<=3){ - i=1; - while(i<=9) - { - x=rand()%3; - y=rand()%9; - if(a[x+1+(j-1)*3][y+1]==0) - { - a[x+1+(j-1)*3][y+1]=i;i++; - } - } - j++; - } -} -void format(int s[][10]) -{ - printf("-------------------------\n"); - for(int i=1;i<10;i++) - { - printf("| "); - for(int j=1;j<10;j++) - { - - printf("%d ",s[i][j]); - if(j%3==0) printf("| "); - } - printf("\n"); - if(i%3==0) printf("-------------------------\n"); - } -} -int main() -{ - random(); - format(a); - return 0; -} -