Advertisement
vitormartinotti

Nicolas Solução 2

Aug 7th, 2023
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.29 KB | None | 0 0
  1. #include<bits/stdc++.h>
  2. using namespace std;
  3. int a[104][104];
  4. int main(){
  5. int n;
  6. cin >> n;
  7. n++;
  8. for(int t=1;t<=(n+2)/2-1;t++){
  9. for(int i=t;i<n-t+1;i++){
  10. for(int j=t;j<n-t+1;j++) a[i][j]++;
  11. }
  12. }
  13. for(int i=1;i<n;i++){
  14. for(int j=1;j<n;j++){
  15. cout << a[i][j] << " ";
  16. }
  17. cout << "\n";
  18. }
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement