a program displays the name of fruits that are sorted from the arrays(program that sort five names)

To write a program that displays the names of fruits sorted from an array, you can follow these steps:

1. Declare and initialize an array with five fruit names.
2. Use a sorting algorithm, such as bubble sort or insertion sort, to sort the elements of the array in alphabetical order.
3. Iterate through the sorted array and display each fruit name.

Here is an example code in Python:

```python
# Step 1: Declare and initialize the array
fruits = ['apple', 'banana', 'orange', 'grape', 'kiwi']

# Step 2: Sort the array in alphabetical order
for i in range(len(fruits)): # Using a simple bubble sort
for j in range(len(fruits) - i - 1):
if fruits[j] > fruits[j + 1]:
fruits[j], fruits[j + 1] = fruits[j + 1], fruits[j]

# Step 3: Display the sorted fruit names
for fruit in fruits:
print(fruit)
```

When you run this code, it will display the fruit names sorted in alphabetical order:

```
apple
banana
grape
kiwi
orange
```

Feel free to modify the code according to your programming language of choice and any specific requirements you may have.