include[HTML_REMOVED]
include[HTML_REMOVED]
int min(int a,int b)
{
int x;
if(b < a)
{
x = a;
a = b;
b = x;
}
return a;
}
int main()
{
int n;
while(scanf(“%d”,&n),n)
{
for(int i =1;i<=n;i){
for(int j=1;j<=n;j){
int up = i,down = n-i+1,left = j,right = n-j+1;
printf(“%d “,min(min(up,down),min(left,right)));
}
printf(“\n”);
}
printf("\n");
}
return 0;
}
//注意 printf(“\n”);
//注意 min自己定义