1
2// STL IN C++ FOR SORING
3#include <bits/stdc++.h>
4#include <iostream>
5using namespace std;
6int main()
7{
8 int arr[] = {1, 5, 8, 9, 6, 7, 3, 4, 2, 0};
9 int n = sizeof(arr)/sizeof(arr[0]);
10 sort(arr, arr+n); // ASCENDING SORT
11 reverse(arr,arr+n); //REVERESE ARRAY
12 sort(arr, arr + n, greater<int>());// DESCENDING SORT
13 }