You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

33 lines
565 B

#include<stdio.h>
#include<stdlib.h>
#include<time.h>
int a[10][10];
void input()
{
for(int i=1;i<10;i++)
for(int j=1;j<10;j++)
scanf("%d",&a[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()
{
input();
format(a);
return 0;
}