← Back
Code Challenge 3.4 - Array Reversal
Objective
Reverse the elements of a given array.
Skills to Practice
- Array manipulation
- Indexing
Challenge Tasks
- Create a console project named Challenge 3-1.
- Prompt the user to input elements into a collection.
- You may choose whether the elements are integers or floating point numbers.
- Let the user specify the size of the collection.
- Reverse the order of the elements within the array without using any built-in reverse methods.
- Display the reversed array to the user in a clear and formatted manner.
Lists
You may complete this code challenge using a list.
Sample Output
Enter the size of your collection: 5 [Enter]
Enter element 1: 12 [Enter]
Enter element 2: 24 [Enter]
Enter element 3: 75 [Enter]
Enter element 4: 100 [Enter]
Enter element 5: 9 [Enter]
Your collection: 12 24 75 100 9
Reversed Order: 9 100 75 24 12