Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<bits/stdc++.h>
- using namespace std;
- int a[104][104];
- int main(){
- int n;
- cin >> n;
- n++;
- for(int t=1;t<=(n+2)/2-1;t++){
- for(int i=t;i<n-t+1;i++){
- for(int j=t;j<n-t+1;j++) a[i][j]++;
- }
- }
- for(int i=1;i<n;i++){
- for(int j=1;j<n;j++){
- cout << a[i][j] << " ";
- }
- cout << "\n";
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement