Declare a single dimension array of size n input n elements to a single dimension array

Sort the elements of an array from highest to lowest and vice versa Also, the program will identify and output the highest and lowest integer.

This webpage shows you how to sort a C++ array with a handful of different methods:

  • Using STL's std::sort()
  • Using a bubble sort
  • Using an insertion sort
  • Using a selection sort
  • Using a merge sort
  • Using a quick sort

I recommend you pick the one that you recall being reviewed in your class, and see if you can follow the code to understand what's going on. Let us know if something doesn't make sense to you, and we can try to help.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.