#include<bits/stdc++.h>
using namespace std;
int main() {
int n;
cin >> n;
// write your code here......
int** a = new int* [n];
for (int i = 0; i < n; i++) {
a[i] = new int[n];
}
for (int i = 0; i < n; i++) {
for (int j = 0; j < n; j++) {
a[i][j] = i + j;
cout << a[i][j] << " ";
}
cout << endl;
}
for (int i = 0; i < n; i++) {
delete[] a[i];
}
return 0;
}

京公网安备 11010502036488号