Question: Reversing an Array Write a program that prompts the user for an integer, then asks the user to enter that many values (test with 5

Reversing an Array Write a program that prompts the user for an integer, then asks the user to enter that many values (test with 5 integer values). Store these values (10, 20, 30, 40, 50) in an array and print the array. Then reverse the array elements so that the first element becomes the last element, the second element becomes the second to last element, and so on, with the old last element now first. Do not just reverse the order in which they are printed; actually change the way they are stored in the array. Do not create a second array; just rearrange the elements within the array you have. When the elements have been reversed, print the array again. Use the below startup code for ReverseArray.java Reversing an Array Write a program that prompts the user for an integer, then asks the user to enter that many values (test with 5 integer values). Store these values (10, 20, 30, 40, 50) in an array and print the array. Then reverse the array elements so that the first element becomes the last element, the second element becomes the second to last element, and so on, with the old last element now first. Do not just reverse the order in which they are printed; actually change the way they are stored in the array. Do not create a second array; just rearrange the elements within the array you have. When the elements have been reversed, print the array again. Use the below startup code for ReverseArray.java
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
