Create a C++ function that orders an array
Here is an example of a C++ function that orders an array using the Bubble Sort algorithm:

```c++
#include <iostream>
using namespace std;

void orderArray(int arr[], int n) {
    int i, j;
    for (i = 0; i < n-1; i++) {
        for (j = 0; j < n-i-1; j++) {
            if (arr[j] > arr[j+1]) {
                // Swap
                int temp = arr[j];
                arr[j] = arr[j + 1];
                arr[j + 1] = temp;
            }
        }
    } 
}

int main()
{
    int myArray[] = {64, 34, 25, 12, 22, 11, 90};
    int n = sizeof(myArray)/sizeof(myArray[0]);
    orderArray(myArray, n);
    cout << "Sorted array: ";
    for (int i=0; i < n; i++)
        cout << myArray[i] << " ";
    cout << endl;
    return 0;
}
```
The output of this program will be:
```
Sorted array: 11 12 22 25 34 64 90
```

This function uses the Bubble Sort algorithm, which works by repeatedly swapping adjacent elements if they are in the wrong order. The function takes two arguments: an array "arr" and an integer "n" representing the number of elements in the array. Inside the function, there is a nested loop that iterates over the array, and swaps adjacent elements if they are in the wrong order until the array is completely sorted.
Complete the following task based on the instruction and optional input provided.### Instruction:
Create a C++ function that orders an array

### Output:
Here is an example of a C++ function that orders an array using the Bubble Sort algorithm:

```c++
#include <iostream>
using namespace std;

void orderArray(int arr[], int n) {
    int i, j;
    for (i = 0; i < n-1; i++) {
        for (j = 0; j < n-i-1; j++) {
            if (arr[j] > arr[j+1]) {
                // Swap
                int temp = arr[j];
                arr[j] = arr[j + 1];
                arr[j + 1] = temp;
            }
        }
    } 
}

int main()
{
    int myArray[] = {64, 34, 25, 12, 22, 11, 90};
    int n = sizeof(myArray)/sizeof(myArray[0]);
    orderArray(myArray, n);
    cout << "Sorted array: ";
    for (int i=0; i < n; i++)
        cout << myArray[i] << " ";
    cout << endl;
    return 0;
}
```
The output of this program will be:
```
Sorted array: 11 12 22 25 34 64 90
```

This function uses the Bubble Sort algorithm, which works by repeatedly swapping adjacent elements if they are in the wrong order. The function takes two arguments: an array "arr" and an integer "n" representing the number of elements in the array. Inside the function, there is a nested loop that iterates over the array, and swaps adjacent elements if they are in the wrong order until the array is completely sorted.