From d44f023d303050e99ca264f6ddf40f054c923461 Mon Sep 17 00:00:00 2001 From: pns4qt5fo <2085596522@qq.com> Date: Sun, 29 Oct 2023 09:30:02 +0800 Subject: [PATCH] ADD file via upload --- matrix.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 matrix.c diff --git a/matrix.c b/matrix.c new file mode 100644 index 0000000..4f74466 --- /dev/null +++ b/matrix.c @@ -0,0 +1,21 @@ +#include +#include +#include +int main() +{ + int a[9][9]; + int i,j; + srand(time(NULL)); + for(i=0;i<=8;i++) + { + for(j=0;j<=8;j++) + { + a[i][j]=rand()%10; + if(a[i][j]!=0) + printf("%d ",a[i][j]); + else + printf(". "); + } + printf("\n"); + } +}