👤

Write a program that prompts the user for an integer, then asks the user to enter that many values. Store these values 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. (Hint: Swap elements that need to change places.) When the elements have been reversed, print the array again.

Sagot :

Answer:

Tap on a clip to paste it in the text box.Welcome to Gboard clipboard, any text that you copy will be saved here.Touch and hold a clip to pin it. Unpinned clips will be deleted after 1 hour.Use the edit icon to pin, add or delete clips.Welcome to Gboard clipboard, any text that you copy will be saved here.

Explanation:

Tap on a clip to paste it in the text box.Welcome to Gboard clipboard, any text that you copy will be saved here.Touch and hold a clip to pin it. Unpinned clips will be deleted after 1 hour.Use the edit icon to pin, add or delete clips.Welcome to Gboard clipboard, any text that you copy will be saved here.Tap on a clip to paste it in the text box.