Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<iostream>
- using namespace std;
- int a[1001][1001];
- int main()
- {
- int n,m,i,j,aux;
- for(i=1;i<=n;i++)
- {
- for(j=1;j<=m;j++)
- {
- cin>>a[i][j];
- }
- }
- for(i=1;i<=n;i++)
- {
- for(j=1;j<=m;j++)
- {
- aux=a[i][j];
- a[i][j]=a[n-i+1][j];
- a[n-i+1][j]=aux;
- }
- }
- for(i=1;i<=n;i++)
- {
- for(j=1;j<=m;j++)
- {
- cout<<a[i][j]<<" ";
- }
- cout<<endl;
- }
- return 0;
- }
- 97
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement