Go: package main

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

var scanner = bufio.NewScanner(os.Stdin)

func nextInt() int {
	scanner.Scan()
	i, e := strconv.Atoi(scanner.Text())
	if e != nil {
		panic(e)
	}
	return i
}
func main() {
	scanner.Split(bufio.ScanWords)
	nums := make([]int, 5)
	for i := 0; i < 5; i++ {
		nums[i] = nextInt()
	}
	sort.Sort(sort.Reverse(sort.IntSlice(nums)))
	for i, v := range nums {
		if i == len(nums)-1 {
			fmt.Printf("%d\n", v)
		} else {
			fmt.Printf("%d ", v)
		}
	}
}

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

C++: #include <iostream>
#include <vector>
#include <string.h>
#include <algorithm>

#if 0
#define DEBUG_0331
#endif

static int getNumbers(std::vector<int>& vec);
static int sortNumbers(std::vector<int>& vec);
static void pushNumbers(std::vector<int>& vec);

int main()
{
    std::vector<int> vector;

    getNumbers(vector);
    sortNumbers(vector);
    pushNumbers(vector);
#ifdef DEBUG_0331
    for (int i = 0; i < vector.size(); i++ ) {
        std::cout << vector.at(i) << std::endl;
    }
#endif
    return 0;
}

static int getNumbers(std::vector<int>& vec)
{
    std::string s1("");
    char ss1[512] = {0};
    char *p = NULL;

    if ( 0x00 == &vec ) {
        return 1;
    }

    std::getline(std::cin, s1);

    p = ss1;
    memset(ss1, '\0', sizeof(ss1));
    memcpy(ss1, s1.c_str(), sizeof(ss1));
    // split
    while (*p) {
        if (' ' != *p) {
            vec.push_back(*p - '0');
        }
        p++;
    }

    return 0;
}

static int sortNumbers(std::vector<int>& vec)
{
    if ( 0x00 == &vec ) {
        return 1;
    }

    // sort
    std::sort(vec.begin(), vec.end(), std::greater<int>());

    return 0;
}

static void pushNumbers(std::vector<int>& vec)
{
    if ( 0x00 == &vec ) {
        return;
    }

    for (unsigned int i = 0; i < vec.size(); i++) {
        std::cout << vec.at(i);
        if (vec.size() - 1 == i) {
            std::cout << '\n';
        } else {
            std::cout << ' ';
        }
    }
}

C++: #include<cstdio>
#include<cstdlib>
#include<cstring>
#include<cmath>
#include<ctime>
#include<cctype>
#include<climits>
#include<iostream>
#include<string>
#include<vector>
#include<map>
#include<list>
#include<queue>
#include<deque>
#include<algorithm>
#include<numeric>
#include<utility>
#include<complex>
#include<memory>
#include<functional>

#define REP(i, n) for(int i = 0;i < n;i++)
#define REPR(i, n) for(int i = n;i >= 0;i--)
#define FOR(i, m, n) for(int i = m;i < n;i++)
#define FORR(i, m, n) for(int i = m;i >= n;i--)
#define SORT(v, n) sort(v, v+n);
#define VSORT(v) sort(v.begin(), v.end());
#define llong long long
#define pb(a) push_back(a)
#define INF 999999999
using namespace std;

typedef vector<int> vi;
typedef vector<long long> vl;
typedef vector<double> vd;
typedef pair<int, int> pii;
typedef pair<long, long> pll;
typedef long long ll;

int dy[] = { 0, 0, 1, -1, 0 };
int dx[] = { 1, -1, 0, 0, 0 };

int main(){
	ios::sync_with_stdio(false);

	vi a(5, 0);

	REP(i, 5)	scanf("%d", &a[i]);

	VSORT(a);

	printf("%d %d %d %d %d\n", a[4], a[3], a[2], a[1], a[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);
	for(int i = 4; i>0; i--){
		cout << a[i] << " ";
	}
	cout << a[0] << endl;
	return 0;
}

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

//const static double	de_PI	= 3.14159265358979323846;
//const static int	de_MOD	= 1000000007;
//const static int	de_MAX	= 999999999;
//const static int	de_MIN = -999999999;

int main(void) {

	//std::ifstream in("123.txt");	std::cin.rdbuf(in.rdbuf());

	std::vector<int> ans(5);
	for (int i = 0; i < 5; i++) {
		std::cin >> ans[i];
	}
	std::sort(ans.begin(), ans.end());
	for (int i = 4; i >= 1; i--) {
		std::cout << ans[i] << " ";
	}
	std::cout << ans[0] << std::endl;

}

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

int main() {
	// your code goes here
	long long int a[5];
	for(int i=0;i<5;i++) cin >> a[i];
	for(int i=4;i>0;i--) cout << a[i] << " ";
	cout << a[0] << endl;
	return 0;
}

C++: #include<iostream>

using namespace std;

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