Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <fstream>
- using namespace std;
- ifstream f("chenar.in");
- ofstream g("chenar.out");
- int a[200][200],n,i,j;
- int main()
- {
- f>>n;
- for(i=1;i<=n;i++)
- for(j=1;j<=n;j++)
- f>>a[i][j];
- for(j=1;j<=n;j++)
- g<<a[1][j]<<" ";
- for(i=2;i<n;i++)
- g<<a[i][n]<< " ";
- for(j=n;j>1;j--)
- g<<a[n][j]<<" ";
- for(i=n;i>1;i--)
- g<<a[i][1]<< " ";
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement