edutedu

problema 10

Jun 11th, 2018
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. int a[100][100], m , n, i, j;
  2. cin>>n>>m;
  3. for(i=1; i<=n; i++)
  4. for(j=1; j<=m; j++)
  5. cin>>a[i][j];
  6. for(j=1; j<=m-1; j++)
  7. for(i=1; i<=n; i++)
  8. swap(a[i][j], a[i+1][j]);
  9. for(i=1;i<=n;i++)
  10. {
  11. for(j=1;j<=n;j++)
  12. cout<<a[i][j]<<" ";
  13. cout<<endl;
  14. }
Add Comment
Please, Sign In to add comment