SHARE
TWEET

Untitled

a guest Feb 27th, 2020 73 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <iostream>
  2. #include <algorithm>
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7.     int a[100];
  8.     int n;
  9.  
  10.     cin >> n; //nhập số phần tử của mảng
  11.     for(int i=0; i<n; i++)
  12.     {
  13.         cin >> a[i];
  14.     }
  15.  
  16.     sort(a, a+n);
  17.  
  18.     int k=n;
  19.     while(k > (n-3))
  20.     {
  21.         k--;
  22.         cout << a[k] << " ";
  23.     }
  24.     return 0;
  25. }
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