Question: Modify program P10_1b.cpp such that it reads some number of integers as defined by SIZE, stored them in array numlist, displays the array numlist, then
Modify program P10_1b.cpp such that it reads some number of integers as defined by SIZE, stored them in array numlist, displays the array numlist, then reverses the contents of the array, and at last displays the contents of that array again.
Make your program as general as possible. Thus, your program should be able to reverse the contents of an array of any size defined by SIZE. Note that we didn't ask you to display the array in reverse, that would be what program P10_2.cpp is doing. We want you to reverse the contents of the array, then display the array itself. Example:
int A = {1, 2, 4, 5, 8, 2, 0, 9};
After you reverse the contents of array A, that array would become: {9, 0, 2, 8, 5, 4, 2, 1}. So, you will display the array A before you reverse the content and after you reversed the contents.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
