If the user selects an option other than Quit, the appropriate operations should be performed, then the options should be given again. Once the user selects Quit, the program should stop.
Following is a sample run of the program:
This program will use pointers to manipulate an integer array of size 10.
First, please enter the integer values.
Please enter integer 0: 5
Please enter integer 1: 10
Please enter integer 2: 15
Please enter integer 3: 20
Please enter integer 4: 25
Please enter integer 5: 0
Please enter integer 6: -10
Please enter integer 7: -20
Please enter integer 8: -30
Please enter integer 9: -40
Please select from the following options:
R) Reverse the array and print the new array contents
E) Print out all of the values stored at the even positions in the array
Q) Quit
Choice: R
The array has been reversed. The new contents are:
-40 -30 -20 -10 0 25 20 15 10 5
Please select from the following options:
R) Reverse the array and print the new array contents
E) Print out all of the values stored at the even positions in the array
Q) Quit
Choice: E
The contents of the even positions are:
-40 -20 0 20 10
Please select from the following options:
R) Reverse the array and print the new array contents
E) Print out all of the values stored at the even positions in the array
Q) Quit
Choice: Q