Write a program that accepts salaries of 25 employees into an array into an array and display the following

i. Sum of all salaries
ii. All salaries below 500
iii. All salaries above 3200
iv. Average salary
v. Message if the salary value has been found or not
vi. Highest salary
vii. Lowest salary
viii. Sorted list of all salaries

Here is a step-by-step guide to writing a program that accomplishes the given task:

Step 1: Initialize an array to store the salaries and other variables needed for calculations and comparisons.
- Create an array called "salaries" with a length of 25.
- Define variables for storing the sum, average, highest salary, and lowest salary.

Step 2: Prompt the user to enter each salary value and store them in the array.
- Use a loop to iterate 25 times.
- Inside the loop:
- Display the prompt for entering the salary.
- Read the salary value from the user input and store it in the respective element of the array.

Step 3: Calculate the sum of all salaries.
- Use a loop to iterate over each salary value in the array.
- Accumulate the sum by adding each salary to the sum variable.

Step 4: Find all salaries below 500 and display them.
- Use a loop to iterate over each salary value in the array.
- For each salary value, check if it is less than 500.
- If it is, display the salary value.

Step 5: Find all salaries above 3200 and display them.
- Use a loop to iterate over each salary value in the array.
- For each salary value, check if it is greater than 3200.
- If it is, display the salary value.

Step 6: Calculate the average salary.
- Divide the sum of all salaries (calculated in Step 3) by the number of employees (25) to get the average salary.

Step 7: Check if a specific salary value has been found or not.
- Use a loop to iterate over each salary value in the array.
- For each salary value, compare it with the desired salary to be checked.
- If a match is found, display a success message.
- If the loop completes without finding a match, display a failure message.

Step 8: Find the highest salary.
- Iterate over each salary value in the array.
- If a salary value is greater than the current highest salary, update the highest salary variable.

Step 9: Find the lowest salary.
- Iterate over each salary value in the array.
- If a salary value is less than the current lowest salary, update the lowest salary variable.

Step 10: Sort the list of all salaries.
- Use any sorting algorithm of your choice (e.g., bubble sort, insertion sort) to sort the salaries array in ascending order.
- Display the sorted list of salaries.

That's it! You now have step-by-step instructions for writing a program that accepts salaries of 25 employees, performs various calculations and comparisons, and displays the required information.

Sure! I can help with that. Here's an example program in Python that can do what you're asking for:

```python
def display_salary_stats(salaries):
# i. Sum of all salaries
total_salaries = sum(salaries)
print("Sum of all salaries:", total_salaries)

# ii. All salaries below 500
below_500 = [salary for salary in salaries if salary < 500]
print("Salaries below 500:", below_500)

# iii. All salaries above 3200
above_3200 = [salary for salary in salaries if salary > 3200]
print("Salaries above 3200:", above_3200)

# iv. Average salary
average_salary = total_salaries / len(salaries)
print("Average salary:", average_salary)

# v. Message if the salary value has been found or not
salary_to_find = int(input("Enter a salary value to find: "))
if salary_to_find in salaries:
print("Salary found!")
else:
print("Salary not found!")

# vi. Highest salary
highest_salary = max(salaries)
print("Highest salary:", highest_salary)

# vii. Lowest salary
lowest_salary = min(salaries)
print("Lowest salary:", lowest_salary)

# viii. Sorted list of all salaries
sorted_salaries = sorted(salaries)
print("Sorted list of salaries:", sorted_salaries)

# Accept salaries of 25 employees into an array
salaries = []
for i in range(25):
salary = int(input("Enter salary of employee {}: ".format(i+1)))
salaries.append(salary)

# Display the salary statistics
display_salary_stats(salaries)
```

To run this program, you can simply copy and paste it into a Python IDE (Integrated Development Environment) or text editor that supports Python syntax. Then, you can run the program and it will prompt you to enter the salaries of the 25 employees. The program will then display the required statistics mentioned in the question.