Go: package main

import (
	"bufio"
	"fmt"
	"os"
	"sort"
	"strconv"
)

var scanner = bufio.NewScanner(os.Stdin)

func nextString() string {
	scanner.Scan()
	return scanner.Text()
}

func nextInt() int {
	n, err := strconv.Atoi(nextString())
	if err != nil {
		fmt.Printf("strconv.Atoi failed: %v\n", err)
	}
	return n
}

func main() {
	scanner.Split(bufio.ScanWords)

	n := 5
	array := make([]int, n)
	for i := 0; i < n; i++ {
		array[i] = nextInt()
	}
	sort.Slice(array, func(i, j int) bool { return array[i] > array[j] })
	arrayStr := fmt.Sprint(array)
	l := len(arrayStr)
	fmt.Println(arrayStr[1:(l - 1)])
}

C++: #include <algorithm>
#include <iostream>
#include <vector>
using namespace std;

int main() {
  int n = 5;
  int a[n];
  for(int i=0;i<n;i++) {
    cin >> a[i];
  }
  sort(a,a+n);
  for(int i=n-1;i>=0;i--) {
    cout << a[i] << (i == 0 ? "\n" : " ");
  }
}

C++: #include<cstdio>
#include<algorithm>

using namespace std;

int main(){
  int a[5],i,j,min,min_n;

  for(i=0;i<5;i++)
    scanf("%d",&a[i]);

  for(i=0;i<5;i++){
    min=a[i]; min_n=i;
    for(j=i+1;j<5;j++){
      if(min<a[j]){
        min=a[j]; min_n=j;
      }
    }
  swap(a[i],a[min]);
  printf( i<4 ? "%d " : "%d\n",a[i]);
  }
  return 0;
}

C++: #include<iostream>
#include<algorithm>
using namespace std;
int main(){
  int n[5];
  for(int i=0;i<5;i++) cin >> n[i];
  sort(n,n+5,greater<int>());
  for(int i=0;i<5;i++){
    if(i!=4) cout << n[i] << ' ';
    else cout << n[i] << endl;
  }
  return 0;
}

C++: #include <cstdio>
#include <iostream>

int main() {
	const int size = 5;
	int arr[size];
	std::cin
		>> arr[0]
		>> arr[1]
		>> arr[2]
		>> arr[3]
		>> arr[4];

	// sort
	for (int i = 0; i < size; i++)
		for (int j = i + 1; j < size; j++)
			if (arr[i] < arr[j]) {
				std::swap(arr[i], arr[j]);
				continue;
			}
			

	// show
	for (int i = 0; i < size; i++)
		std::cout << arr[i] << " ";

	std::cout << std::endl;
}

C++: #include <iostream>
#include <algorithm>
using namespace std;
int main() {
	int a[5];
	for(int i=0;i<5;i++) cin >> a[i];
	sort(a, a+5);
	cout << a[4];
	for(int i = 3; i>=0; i-- ) cout << " " << a[i];
	cout << endl;
	return 0;
}

C++: #include <iostream>
#include <algorithm>
using namespace std;

int main() {
  int n[5];

  for (int i = 0; i < 5; i++) {
    cin >> n[i];
  }
  sort(n, n + 5);
  
  cout << n[4] << " " << n[3] << " " << n[2] << " " << n[1] << " " << n[0] << endl;
}

C++: #include <bits/stdc++.h>
using namespace std;
int main(){
  long long a[5];
  for(int i=0;i<5;i++){
    cin >> a[i];
  }
  sort(a,a+5);
  reverse(a,a+5);
  for(int i=0;i<5;i++){
    if(i>0){
      cout << ' ';
    }
    cout << a[i];
  }
  cout << endl;
  return 0;
}

C++: #include <iostream>
#include <algorithm>
using namespace std;
int main(){
	int a[5];
	for(int i=0;i<5;i++){
		cin>>a[i];
	    }
	sort(a,a+5);
	reverse(a,a+5);
	cout<<a[0];
	for(int j=1;j<=5;j++){
		cout<<" "<<a[j];
	    }
	cout<<endl;
	return 0;
	}

C++: // Sorting Five Numbers

#include <iostream>
using namespace std;

int main() {
    int array[5];
    int tmp;

    for (int i = 0; i < 5; i++)
        cin >> array[i];

    for (int i = 0; i < 5; i++) {
        for (int j = 4; j > i; j--) {
            if (array[j-1] < array[j]) {
                tmp = array[j-1];
                array[j-1] = array[j];
                array[j] = tmp;
            }
        }
    }

    for (int i = 0; i < 5; i++) {
        if (i) cout << ' ';
        cout << array[i];
    }
    cout << '\n';
    return 0;
}

C++: #include<iostream>
int main()
{
	int n[5];
	for (int i = 0; i < 5; i++)
	{
		std::cin >> n[i];
	}
	for (int i = 0; i < 5; i++)
	{
		int max = INT_MIN, max_index = 0;
		for (int j = i; j < 5; j++)
		{
			if (max < n[j])
			{
				max = n[j];
				max_index = j;
			}
		}
		std::swap(n[i], n[max_index]);
	}
	for (int i = 0; i < 5; i++)
	{
		std::cout << n[i] << ' ';
	}
	std::cout << std::endl;
	return 0;
}

C++: #include<iostream>
#include<algorithm>
#include<functional>
using namespace std;
int main(){
	int a[5];
	for(int i=0;i<5;i++) cin>>a[i];
	sort(a,a+5,greater<int>());
	for(int i=0;i<5;i++) cout<<a[i]1;
}

C++: #include <iostream>
#include <algorithm>
using namespace std;

int main() {
  int n[5];

  for (int i = 0; i < 5; i++) {
    cin >> n[i];
  }
  sort(n, n + 5);
  for (int i = 4; i >= 0; i--) {
    cout << n[i] << endl;
  }
}

C++: #include <iostream>
#include <algorithm>
using namespace std;

int main(){
	int a[5];
	for(int i = 0; i < 5; i++){
		cin >> a[i];
	}
	sort(a,a+5);
	cout << a[4];
	for(int i = 1; i < 5; i++){
		cout << " " << a[4-i];
	}
	cout << endl;
}

C++: #include <bits/stdc++.h>
using namespace std;

int main(){
	
	int d[5];
	for(int i=0;i<5;i++)cin>>d[i];
	sort(d, d+5, greater<int>());
	for(int i=0;i<5;i++)cout<<d[i]<<(i==4?"\n":" ");
	
	return 0;
}

C++: #include <iostream>
using namespace std;
void qs(int*, int);

int main() {
	//int n;
	//cin >> n;
	//int *a=new int[n];
	int a[5];
	for (int i = 0; i < 5; i++) {
		cin >> a[i];
	}
	qs(a, 4);
	for (int i = 4; i > 0; i--)
		cout << a[i] << " ";
	cout << a[0]<<endl;
	return 0;
}


void qs(int *a, int e){
	if (e == 0)
		return;
	int t;
	if (e == 1) {
		if (a[0] > a[1]) {
			t = a[0];
			a[0] = a[1];
			a[1] = t;
		}
		return;
	}
	int p = a[0], lp = -1, rp = e + 1,s=0;
	if (p < a[1])
		p = a[1];
	while (1){
		while (1){
			lp++;
			if (lp == e) {
				qs(a, e - 1);
				return;
			}
			if (lp == rp) {
				s = 2;
				break;
			}
			if (a[lp] >= p)
				break;
		}
		if (s == 0) {
			while (1) {
				rp--;
				if (rp == 0) {
					qs(a + 1, e - 1);
					return;
				}
				if (lp == rp) {
					s = 1;
					break;
				}
				if (a[rp] < p)
					break;
			}
		}
		if (s == 1) {
			qs(a, lp-1);
			qs(a + lp, e - lp);
			return;
		}
		if (s == 2) {
			qs(a, rp - 1);
			qs(a + rp, e - rp);
			return;
		}
		t = a[lp];
		a[lp] = a[rp];
		a[rp] = t;
	}
}

C++: #include <iostream>
using namespace std;

int main() {
  int x[5],xi;
  cin >> x[0] >> x[1] >> x[2] >> x[3] >> x[4];
  for(int i=0;i<5;i++) {
    for(int j=i;j<5;j++) {
      if(x[i] < x[j]) {
        xi = x[i];
        x[i] = x[j];
        x[j] = xi;
      }
    }
  }
  for(int i=0;i<4;i++) {
    cout << x[i] << " ";
  }
  cout << x[4] <<endl;
}

C++: #include <algorithm>
#include <cstdio>
#include <iostream>
#include <cstdlib>

using namespace std;

int arr[5];

int main()
{
	for(int a=0;a<5;a++)
	{
		scanf("%d",&arr[a]);
	}
	sort(arr,arr+5);
	for(int a=4;a>=0;a--)
	{
		printf("%d",arr[a]);
		if(a>0)
		printf(" ");
	}
	printf("\n");
	return 0;
}

C++: #include <cstdio>
#include <algorithm>

using namespace std;

int main()
{
	for(int a[5];scanf("%d%d%d%d%d",a,a+1,a+2,a+3,a+4)==5;){
		sort(a,a+5);
		reverse(a,a+5);
		printf("%d %d %d %d %d\n",a[0],a[1],a[2],a[3],a[4]);
	}
	
	return 0;
}

C++: #include<iostream>
#include<vector>
#include<algorithm>
using namespace std;
int main(){
  vector<int> a;
  int ptr=0;
  int tmp;
  while(cin>>tmp) a.push_back(tmp);
  stable_sort(a.begin(),a.end());
  for(int i=0;i<a.size();++i) cout<<a[i]<<" ";
  cout<<endl;
  return 0;
}

C++: #include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

void solve()
{
	vector<int> Vec(5);
	for(unsigned int i = 0; i < Vec.size(); ++i)
	{
		cin >> Vec[i];
	}
	sort(Vec.begin(), Vec.end());
	for(unsigned int i = Vec.size() - 1; i > 0; --i)
	{
		cout << Vec[i] << " ";
	}
	cout << Vec[0] << endl;
}

int main()
{
	solve();
	return(0);
}