title: How to sort C++ array in ASC and DESC mode?
body: <p>I have this array:</p>
  
  <pre><code>array[0] = 18;
  array[1] = -10;
  array[2] = 2;
  array[3] = 4;
  array[4] = 6;
  array[5] = -12;
  array[6] = -8;
  array[7] = -6;
  array[8] = 4;
  array[9] = 13;
  </code></pre>
  
  <p>how do I sort the array in asc/desc mode in C++?</p>