#include <iostream>
#include <cstring>
using namespace std;
int const N = 110;
int f[N][N];
int main()
{
int n;
while(cin >> n,n)
{
for(int i = 1; i <= n; i ++)
for(int j = 1; j <= n; j ++)
f[i][j] = 1 + max(i,j) - min(i,j);
for(int i = 1; i <= n; i ++)
{
for(int j = 1; j <= n; j ++)
cout << f[i][j] << ' ';
cout << endl;
}
cout << endl;
}
return 0;
}
真的要开2维数组吗?
开不开无所谓的 简单题 随便写写
hh