Question: Given an array of positive integers, reverse the entire list. You must physically rearrange the elements in the list, and not simply print the list

Given an array of positive integers, reverse the entire list. You must physically rearrange the elements in the list, and not simply print the list in reverse order. Your C++ program will need to read the list of up to 20 numbers from the keyboard, and store them into an array. The number -1 is used to signal the end of the list. Once the numbers have been stored in the array, your program should then proceed to rearrange the elements in the list. input: 9 0 2 1 8 -1\ output: 8 1 2 0 9 \ At the end of the program, the starter code will print your array out to the screen for verification.

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!