Advertisement
Guest User

Untitled

a guest
Dec 14th, 2017
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.24 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. int main()
  4. {
  5. int i,j,M[50][50],x,z,n;
  6. n=7;
  7. z=n;
  8. for(i=x;i<=n;i++)
  9. {for(j=x;j<=n;j++)
  10. {
  11. M[i][j]=x;
  12. }
  13. x++;
  14. n--;
  15. }
  16. for(i=1;i<=z;i++)
  17. {for(j=1;j<=z;j++)
  18. cout<<M[i][j]<<" ";
  19. cout<<endl;
  20. }
  21.  
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement