-
-
Save enzerr/29db7df3b1b59477c5f1156ed7f10926 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include<bits/stdc++.h> | |
using namespace std; | |
const int maxn = 1e2 + 5; | |
int mtx[maxn][maxn]; | |
int main(){ | |
int n; cin >> n; | |
for(int k = 0; k < (n+1)/2; k++){ | |
for(int i = k; i < n-k; i++){ | |
for(int j = k; j < n-k; j++){ | |
mtx[i][j]++; | |
} | |
} | |
} | |
for(int i = 0; i < n; i++){ | |
for(int j = 0; j < n; j++){ | |
cout << mtx[i][j]; | |
} | |
cout << '\n'; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment