Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <bits/stdc++.h>
- using namespace std;
- int n,m,a[1005][1005],p,q;
- int main()
- {
- int x;
- cin>>p>>q;
- n=1;
- for(int i=1; i<=p; i++)
- {
- m=1;
- for(int j=1; j<=q; j++)
- {
- cin>>x;
- if(i!=(p-1) && j!=(q-1))
- a[n][m++]=x;
- }
- if(i!=p-1)
- n++;
- }
- n--;
- m--;
- for(int i=1; i<=n; i++)
- {
- for(int j=1; j<=m; j++)
- cout<<a[i][j]<<" ";
- cout<<"\n";
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment