SHARE
TWEET

Untitled

a guest Sep 21st, 2019 90 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7.     int a[100][100], i1, j1, n;
  8.  
  9.     cin >> n;
  10.  
  11.     for(int i = 0; i < n; i++)
  12.         for(int j = 0; j < n; j++)
  13.             cin >> a[i][j];
  14.  
  15.     cin >> i1 >> j1;
  16.  
  17.     for(int k = 0; k < n; k++)
  18.     {
  19.         if(i1 >= n || j1 >= n)
  20.             break;
  21.  
  22.         cout << a[i1+k][j1+k] << " ";
  23.  
  24.     }
  25.  
  26.     return 0;
  27. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top