~cpp
#include <iostream>
using namespace std;
void main()
{
int arr[10] = {1,5,3,8,10,6,4,7,9,2};
int i,j;
for(i=0; i<9; i++)
{
for (j=i+1; j<10; j++)
{
if (arr[i]> arr[j])
{
int swap;
swap = arr[j];
arr[j] = arr[i];
arr[i] = swap;
}
}
}
for(i=0; i<10; i++)
cout << arr[i];
}