规律:这个 N阶二维数组满足 ####M[i][j]=2i+j
#include<iostream>
#include<cmath>
using namespace std;
int q[15][15];
int main()
{
int n;
while(cin>>n,n)
{
for(int i=0;i<15;i++)
{
q[i][i]=pow(2,2*i);
for(int j=i;j<15;j++)
{
q[i][j]=pow(2,i+j);
q[j][i]=pow(2,i+j);
}
}
//输出
for(int i=0;i<n;i++)
{
for(int j=0;j<n;j++)
{
cout<<q[i][j]<<' ';
}
cout<<endl;
}
cout<<endl;
}
return 0;
}