diff --git a/作业1.c b/作业1.c new file mode 100644 index 0000000..2823238 --- /dev/null +++ b/作业1.c @@ -0,0 +1,27 @@ +#include +int main() +{ + int a[10][10]; + int i,j,k; + for(i=0;i<9;i++){ + for(j=0;j<9;j++){ + scanf("%d",&a[i][j]); + } + } + + for(i=0;i<9;i++) + {if(i==0||i%3==0) + printf("|-----------|\n"); + + + for(j=0;j<9;j++) + { + + if(j==0||j%3==0) + printf("|"); + + printf("%d",a[i][j]); + if(j==8) printf("\n"); + } + } +}