Question: in C++ please Write a program that takes a list of integers as input. The input begins with an integer indicating the number of integers

 in C++ please Write a program that takes a list ofintegers as input. The input begins with an integer indicating the number

in C++ please

Write a program that takes a list of integers as input. The input begins with an integer indicating the number of integers that follow. You can safely assume that the number of integers entered is always less than or equal to 10 . The program then determines whether these integers are sorted in the ascending order (i.e., from the smallest to the largest), descending order (i.e., from the largest to the smallest), or are out of order. If these integers are sorted in the ascending order, the program will output Sorted - Ascending. If the values are in descending order, the program will output Sorted - Descending. Otherwise, it will output Unsorted. Ex: if the user enters: 71342457 the program will output: Unsorted If the user enters: 712457910 the program will output: Sorted - Ascending If the user enters: 575410 the program will output: Sorted - Descending You MUST define and call the following function to determine whether the integers are sorted in the ascending order or not. This function will take the array of the integers and its size as input and return a boolean value with true indicating sorted and false for unsorted. If the array is sorted, message parameter should be set to the correct string representing the sort ordering. bool isSorted(int array[], int size, string\& message); Any attempt to hard code answers will result in a 0 for the exercise

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!