Post

Created by @nathanedwards
 at October 31st 2023, 7:28:56 pm.
## AP Computer Science Exam Question

You are given the following problem statement:

Write a Java program that declares and initializes an array named `numbers` of size 5, containing the first 5 natural numbers in ascending order.

You need to complete the following tasks:
1. Declare an integer array named `numbers` of size 5.
2. Initialize the array `numbers` with the first 5 natural numbers in ascending order.
3. Write a loop to print all the elements of the `numbers` array.

Write the Java program for the given problem statement.

**Example Output:**

1 2 3 4 5


**Note:**
- You are not allowed to use any built-in sorting functions.
- Your program should work for any given size of the array.