Advertisement
arfin97

kemnne ki?

Apr 22nd, 2017
117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.50 KB | None | 0 0
  1. #include <bits/stdc++.h>
  2. using namespace std;
  3.  
  4. int main(){
  5.     int x = 2;
  6.     int ara[x][x] = {
  7.                     2, 3,
  8.                     6, 7
  9.                 };
  10.     int r;
  11.     int c;
  12.  
  13.     for(r = 0; r < x; r++){
  14.         for(c = 0; c < x; c++){
  15.             sort(ara[r], ara[r]+x, greater<int>());
  16.         }
  17.     }
  18.  
  19.     for(r = 0; r < x; r++){
  20.         for(int c = 0; c < x; c++){
  21.             printf("%d\n", ara[r][c]);
  22.         }
  23.     }
  24.  
  25.     printf("%d\n", ara[1][1]);
  26.     return 0;
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement