Advertisement
Guest User

v48

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