Advertisement
Dizzy3113

Untitled

Jan 14th, 2020
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7. int a[51][51], i, j, n, nr=0;
  8. cin>>n;
  9. for(i=1; i<=n; i++)
  10. for(j=1; j<=n; j++)
  11. {
  12. a[i][j]=nr;
  13. nr+=2;
  14. }
  15.  
  16. cout<<endl;
  17. for(i=1; i<=n; i++)
  18. {
  19. for(j=1; j<=n; j++)
  20. cout<<a[i][j]<<" ";
  21. cout<<endl;
  22. }
  23.  
  24.  
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement