Question
Write a program that asks the user to enter an array of random numbers, then sort the numbers (descending order), after that reverse it (the
Write a program that asks the user to enter an array of random numbers, then sort the numbers (descending order), after that reverse it (the first element will be the last).
Below an example of execution, (users input is in red): *********Welcome to the sorting program************* Please enter the size of the array A you want to sort in descending way:
5 Please enter A[0]: 2 Please enter A[1]: 8 Please enter A[2]: 5 Please enter A[3]: 9 Please enter A[4]: 1 The array A you gave and want to sort is: 2 8 5 9 1 The array A sorted in a descending way: 9 8 5 2 1 Reversed sorted array A: 1 2 5 8 9 Note: Your codes should be well commented.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started