#include
int main()
{
int i = 0, j = 0, s = 0;
int a[9] = { 22, 54, 32, 65, 865, 347, 85, 23, 34 };
for (i = 0; i < 9; i++)
printf("%d ", a[i]);
printf("\n");
int temp = 0;
for (i = 0; i < 9; i++)
{
s = i;
for (j = i + 1; j < 9; j++)
{
if (a[j] > a[s])
s = j;
}
if (s != i)
{
temp = a[s];
a[s] = a[i];
a[i] = temp;
}
}
for (i = 0; i < 9; i++)
{
printf("%d ", a[i]);
}
printf("1");
return 0;
}