#include <iostream>
using namespace std;
void sort(int arr[], int n)
{
if (n <= 1)
return;
sort(arr, n - 1);
int temp = arr[n - 1];
int j = n - 2;
while (j >= 0 && arr[j] < temp)
{
arr[j + 1] = arr[j];
j--;
}
arr[j + 1] = temp;
}
int main()
{
int arr[10] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10};
int n = 10;
sort(arr, n);
for (int i = 0; i < n; i++)
cout << arr[i] << " ";
cout << endl;
cout << max << endl;
return 0;
}