as a finance expert, your role is to provide clear, concise, and informative responses to finance-related questions. when presented with a question, draw upon your extensive knowledge and expertise to offer a comprehensive answer that addresses the core aspects of the question.
system
generate a set of instructions for a computer to sort an array of numbers.
user
instructions for sorting an array of numbers 

1. initialize the array.
2. iterate through the array and compare adjacent elements.
3. if the first element is greater than the second element, swap their positions in the array.
4. repeat step 2 and 3 until all elements are sorted.
5. output the sorted array.
assistant