Go: package main

import (
	"fmt"
	"sort"
)

func main() {
	var a, b, c, d, e int
	fmt.Scan(&a, &b, &c, &d, &e)
	dataset := []int{a, b, c, d, e}

	sort.Sort(sort.Reverse(sort.IntSlice(dataset)))
	fmt.Printf("%d %d %d %d %d\n", dataset[0], dataset[1], dataset[2], dataset[3], dataset[4])
}

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

int main() {
 int n[5];
 cin >> n[0] >> n[1] >> n[2] >> n[3] >> n[4];
 for (int i=4;i>=1;i--) for (int j=0;j<i;j++) if (n[j]<n[j+1]) swap(n[j],n[j+1]);
 cout << n[0] << " " << n[1] << " " << n[2] << " " << n[3] << " " << n[4] << endl;
 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 = -100001, 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];
		if (i != 4)
		{
			std::cout << ' ';
		}
	}
	std::cout << std::endl;
	return 0;
}

C++: #include <iostream>
#include <cstdio>
#include <algorithm>
#include <cassert>
#include <vector>
#include <string>
#include <cmath>
#include <map> 
#include <sstream>
#include <cstdio>
#include <complex>
#include <cstring>
using namespace std;
 
const int MAX= 10000100;

#define loop(i,a,b) for(int i = a ; i < b ; i ++)
#define rep(i,a) loop(i,0,a)
#define all(a) (a).begin(),(a).end()
#define ll long long int
#define gcd(a,b) __gcd(a,b)
#define pb(a) push_back(a)
int GCD(int a, int b) {if(!b) return a; return gcd(b, a%b);}
int lcm(int a, int b) {return a*b / gcd(a, b);}

int main(void){
  int a[5];
  rep(i,5)cin>>a[i];
  sort(a,a+5,greater<int>());
  rep(i,5)cout<<a[i]<<(i!=4?' ':'\n');
}

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";
    }
}

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++: /* All men have limits. They learn what they are and learn
   not to exceed them, I ignore mine. -Batman           */

#include <bits/stdc++.h>
//#include <Windows.h>
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]<<endl;
	else cout<<n[i]<<" ";
}
return 0;
}

C++: #include <bits/stdc++.h>

using namespace std;

typedef long long ll;
typedef unsigned long long ull;
typedef vector<int> vi;
typedef pair<int, int> ii;
typedef pair<ll, int> li;
typedef pair<int, ll> il;
typedef vector<ii> vii;
typedef vector<il> vil;
typedef vector<li> vli;

#define F first
#define S second
#define pb(x) push_back(x)
#define mp(a,b) make_pair(a,b)
#define sz size()
#define all(A)    A.begin(), A.end()
#define mem(a, b) memset(a, b, sizeof(a))
#define f0(i,b)   for(int i=0;i<(b);i++)
#define f1(i,b)   for(int i=1;i<=(b);i++)
#define f2(i,a,b) for(int i=(a);i<=(b);i++)
#define fr(i,b,a) for(int i=(b);i>=(a);i--)
#define rep(i,a,b,c) for(int i=(a);i!=(b);i+=(c))
#define mod 1000000007

#define forr(i,n)    for(i=0; i<n; i++)
#define whilee(i,t)  while(i!=t)
#define  sl(a)  scanf("%lld",&a)
#define  pl(a)  printf("%lld",a)

//for(auto it =A.begin(); it!=A.end(); it++)
//sort(A.begin(),A.end());
//binary_search(A.begin(),A.end(),x);
//reverse(A.begin(), A.end());
//cout << *max_element(A.begin(), A.end());
//cout << *min_element(A.begin(), A.end());
//count(A.begin(), A.end(), X); //counts the occurrences of X
//distance(A.begin(),A.end());  //distance between first to last element
//accumulate(A.begin(), A.end(), 0); //add
//next_permutation(A.begin(), A.end());
//prev_permutation(A.begin(), A.end());
//swap(S[0], T[0]);
//scanf("%d",&x);
//printf("%d\n",x);

vector <int> A;
//deque <int> A;
//queue <int> A;
//stack <int> A;
//set <int> A;
//map <int,int> A;
//pair <int,int> A ;
//vector <pair <int,int>> A ;
//char ch;
//string S, T, U;
ll i, j, k, a, b, c, d, f, g, h, l, m, n, p, q, r, s, t, w, x, y, z, maxx=INT_MIN, minn=INT_MAX, ans=0, sum=0, cnt=0;

int main()
{
    //ios_base::sync_with_stdio(false);
    //cin.tie(nullptr);
    //cout.tie(nullptr);

    forr(i,5)
    {
        cin>>x;
        A.pb(x);
    }
    sort(all(A),greater<>());
    forr(i,4)
    {
        cout<<A[i]<<" ";
    }
    cout<<A[4]<<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,greater<int>());
  cout<<a[0]<<" "<<a[1]<<" "<<a[2]<<" "<<a[3]<<" "<<a[4]<<endl;
  
  return 0;
}

C++: #include<iostream>

int main(){
   int i[5],a,b,n;
   for(a=0;a<5;++a){
    std::cin>>i[a];
    }
    for(a=0;a<4;++a){
        for(b=a+1;b<5;++b){
        if(i[a]<i[b]){
        n=i[a];
        i[a]=i[b];
        i[b]=n;
        }
        }
  }
  
      for(a=0;a<4;++a){
      std::cout<<i[a]<<" ";
      }
      std::cout<<i[4]<<std::endl;
      
    return 0;
    }