I am trying to figure out how to sort an array with a stack class. The array (pointer) and its length should be passed to the function as parameters so that the original will be sorted. The array created in main() should contain a maximum of 20 integers which should be entered at runtime (input to be ended by the value 0 or automatically when the 20th value is entered). As it it is going through the array, it should place the largest number onto the stack (push). Each time it steps through the array it should find the next smallest number and push it onto the stack. I can assume no two numbers are duplicated in the array. When the stack is popped, all entries should appear in ascending order.
Thank you so much!