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 <iostream>
#include <cstring>

using namespace std;

namespace sorting_five_numbers
{
    class SortingFiveNumbers
    {
    private:
        //! データサイズ
        static const int Size = 5;

        //! 入力値
        int dataList[Size];

    public:
        /**
        * @brief コンストラクタ
        */
        SortingFiveNumbers(int target[]) {
            memset(dataList, 0, Size);

            for (int i = 0; i < Size; i++) {
                dataList[i] = target[i];
            }
        }

        /**
        * @fn int* createDescendingList()
        * @brief 降順にソートしたリストを生成する
        * @return int* ソート済みリスト
        */
        int* createDescendingList();
    };

    class Control
    {
    private:
        //! データサイズ
        static const int Size = 5;

    public:
        /**
        * @fn bool executeEx()
        * @brief 5つの整数を読み込み、降順に整列し出力する
        * @return bool 入力値が範囲内ならtrueを、そうでなければfalseを返す
        */
        bool executeEx();

    private:
        /**
        * @fn void read(int target[])
        * @brief 標準入力から読み込む
        * @param[out] target 入力データ
        */
        void read(int target[]);

        /**
        * @fn void write(int target[])
        * @brief 標準出力に書き込む
        * @param[in] target 出力データ
        */
        void write(int target[]);

        /**
        * @fn bool check(int target[])
        * @brief 入力データが範囲内か調べる
        * @param[in] target 調査対象
        * @return bool 入力データが範囲内ならtrueを、そうでなければfalseを返す
        */
        bool check(int target[]);
    };
}

using namespace sorting_five_numbers;

int* SortingFiveNumbers::createDescendingList()
{
    for (int i = 0; i < Size - 1; i++) {
        int max = i;
        for (int j = i + 1; j < Size; j++) {
            if (dataList[max] < dataList[j]) {
                max = j;
            }
        }
        int t = dataList[i];
        dataList[i] = dataList[max];
        dataList[max] = t;
    }

    return dataList;
}

bool Control::executeEx()
{
    int input[Size] = { 0 };
    int* output = NULL;

    read(input);

    if (!check(input))
        return false;

    SortingFiveNumbers list(input);

    output = list.createDescendingList();

    write(output);

    return true;
}

void Control::read(int target[])
{
    for (int i = 0; i < Size; i++)
        cin >> target[i];
}

void Control::write(int target[])
{
    //for (int i = 0; i < Size; i++) {
    //    (i != Size) ? cout << target[i] << " " : cout << target[i] << "\n";
    //}
    for (int i = 0; i < Size; i++) {
        cout << target[i] << " ";
    }
}

bool Control::check(int target[])
{
    static const int Min = -100000;
    static const int Max = 100000;

    for (int i = 0; i < Size; i++) {
        if (Min > target[i] || Max < target[i])
            return false;
    }

    return true;
}

int main()
{
    if (!Control().executeEx())
        return 1;
}

C++: //0018 Sorting Five Numbers
//®a,b,c,d,eªüÍ³ê½Æ«A~É®ñµÄoÍ·évOðì¬¹æ

//±ñÈsort()Ä×ÎIíéæ¤ÈâèAVÎÈ¢Æ¹¶áÈ¢

#include<iostream>
#include<algorithm>
#include<functional>
using namespace std;

int main(void)
{
	const int N = 5;
	int a[N];

	struct X
	{
		int operator()(int) { int a;cin >> a;return a;}
	};
	struct Y
	{
		int n;
		Y():n(0){}
		void operator()(int a) { (n++?cout<<' '<<a:cout<<a);}
	};
	transform(a, a+N, a, X());
	sort(a, a+N, greater<int>());
	for_each(a, a+N, Y());
	cout << endl;

	/*
	//±ê¾ÆAüÍÉEOFªKvÅAoÍÉXy[Xª½­ÈÁÄµÜ¤
	copy(istream_iterator<int>(cin), istream_iterator<int>(), a);
	sort(a, a+N, greater<int>());
	copy(a, a+N, ostream_iterator<int>(cout, " "));
	*/
	return 0;
}

C++: #include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <ctime>
#include <cassert>
#include <iostream>
#include <sstream>
#include <string>
#include <list>
#include <vector>
#include <queue>
#include <set>
#include <map>
#include <utility>
#include <numeric>
#include <algorithm>
#include <bitset>
#include <complex>
#include <fstream>
using namespace std;
typedef long long ll;
typedef vector<int> vint;
typedef pair<int, int> pint;
#define rep(i, n) REP(i, 0, n)
#define ALL(v) v.begin(), v.end()
#define MSG(a) cout << #a << " " << a << endl;
#define REP(i, x, n) for(int i = x; i < n; i++)
template<class T> T RoundOff(T a){ return int(a+.5-(a<0)); }
template<class T, class C> void chmax(T& a, C b){ if(a < b) a = b; }
template<class T, class C> void chmin(T& a, C b){ if(b < a) a = b; }
template<class T, class C> pair<T, C> mp(T a, C b){ return make_pair(a, b); }


int main()
{
	vint v(5);
	
	rep(i, 5)
		cin >> v[i];

	sort(ALL(v), greater<int>());
	
	rep(i, 5)
		cout << v[i] << (i != 4 ? "_" : "");
	
	cout << endl;
}

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

int main(){
  vector<int> n(5);

  cin >> n[0] >> n[1] >> n[2] >> n[3] >> n[4];

  sort(n.begin(), n.end(), greater<int>());

  for(int i=0; i<n.size(); i++) {
    cout << n[i] << " ";
  }
  cout << "\n";

  return 0;
}

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

int main() {

  int input;

  vector<int> ans;

  for ( int i = 0; i < 5; i++ ) {

    cin >> input;
    ans.push_back(input);

  }

  sort( ans.begin(), ans.end(), greater<int>() );

  for ( int i = 0; i < 5; i++ ) {
    if ( i != 0 ) cout << " ";
    cout << ans[i];
  }

  cout << endl;

  return 0;

}

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

int main(){
  vector<int> n(5);

  cin >> n[0] >> n[1] >> n[2] >> n[3] >> n[4];

  sort(n.begin(), n.end(), greater<int>());

  for(int i=0; i<n.size(); i++) {
    cout << n[i];
    if(i==n.size()-1){
      cout << "\n";
    }else{
      cout << " ";
    }
  }
  return 0;
}

C++: #include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int (i)=0;(i)<(n);(i)++)

vector<int> a(5);

int main() {
	rep(i,5) cin >> a[i];
	sort(a.rbegin(), a.rend());
	rep(i,5) cout << a[i] << (i==4 ? '\n' : ' ');
}

C++: //Vol0 0018
#include<stdio.h>
int main()
{
	int x[5],bak[5],c=-100001,t[5]={6},r=1,f=1;;
	for(int i=0;i<5;i++){
		scanf("%d",&x[i]);
	}
	for(int i=0;i<5;i++){
		for(int j=0;j<5;j++){
			r=1;
			if(f==1){
				for(int k=0;k<5;k++){
					if(t[k]==i){
						r=0;
						break;
					}
				}
				f=0;
			}
			if(c<x[j]&&r){
				c=x[j];
				t[i]=j;
			}
		}
		bak[i]=c;
	}
	for(int i=0;i<5;i++){
		printf("%d",bak[i]);
		if(i==4){
			printf("\n");
		}else{
			printf(" ");
		}
	}
	return 0;
}

C++: 
#include <iostream>

int main() {
	int array[5];

	for (auto& a : array)
	{
		std::cin >> a;
	}
	
	for (size_t i = 0; i < 4; i++)
	{
		int* pMax = &array[i];
		for (size_t j = i +1 ; j < 5; j++)
		{
			if (*pMax < array[j])
			{
				int tmp = *pMax;
				*pMax = array[j];
				array[j] = tmp;	
			}
		}
	}

	std::printf("%d %d %d %d %d\n", array[0], array[1], array[2], array[3], array[4]);

	return 0;
}

C++: #include <iostream>
using namespace std;
int main()
{
	int A[5] = {};
	cin >> A[0] >> A[1] >> A[2] >> A[3] >> A[4];
	for (int i = 1; i < 5; ++i){
		for (int j = i; j >= 1; --j){
			if (A[j] > A[j - 1]) swap(A[j], A[j - 1]);
			else break;
		}
	}
	cout << A[0] << " " << A[1] << " " << A[2] << " " << A[3] << " " << A[4] << "\n";
	return 0;
}