scanf("%d%d",&n,&m);
for(int i=0;i<n;i++)
for(int j=0;j<m;j++)
scanf("%d",&a[i][j]);
......
{
printf("%d ",a[i][j]);
if(i!=0)
printf("\n");
}