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>
#include<algorithm>
#include<vector>
#include<functional>
using namespace std;

int main(void){
  vector<int> nums;
  int a, b, c, d, e;

  cin >> a >> b >> c >> d >> e;
  nums.push_back( a );
  nums.push_back( b );
  nums.push_back( c );
  nums.push_back( d );
  nums.push_back( e );

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

  cout << nums[0];
  for(int i = 0; i < 4; i++)
    cout << ' ' << nums[i + 1];
  cout << endl;
  return 0;
}

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

int main(){
int a[5];
int biggest[5];
cin>>a[0]>>a[1]>>a[2]>>a[3]>>a[4];
biggest[0]=a[0];
for(int i=1;i<5;i++){
for(int j=0;j<i;j++){
if(a[i]>biggest[j]){
for(int k=i;k>j;k--){
biggest[k]=biggest[k-1];}
biggest[j]=a[i];
break;}}}
for(int i=0;i<5;i++){
cout<<biggest[i]<<" ";}}

C++: #define _USE_MATH_DEFINES
#include <iostream>
#include <queue>
#include <vector>
#include <math.h>
#include <algorithm>
#include <iomanip>
#include <string>
#include <stack>
using namespace std;

int main(){
	priority_queue<int> q;
	for (int i = 0; i < 5; ++i) {
		int a;
		cin >> a;
		q.push(a);
	}
	for (int i = 0; i < 5; ++i) {
		cout << q.top();
		if (i != 4) cout << ' ';
		q.pop();
	}
	cout << endl;
	return 0;
}

C++: #include<iostream>
#include<algorithm>
#include<vector>
using namespace std;
#define REP(i, j) for(int i = 0; i < j; i++)
#define FOR(i, j, k) for(int i = j; i < k; i++)
const int N = 5;

int main(){
    vector<int> v(N);
    REP(i, N) cin >>v[i];
    sort(v.begin(), v.end());
    reverse(v.begin(), v.end());
    cout <<v[0];
    FOR(i, 1, N) cout <<" " <<v[i];
    cout <<endl;
    return 0;
}

C++: 
#define _CRT_SECURE_NO_WARNINGS
#include <cfloat>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <iostream>
#include <memory>
#include <string>

#include <algorithm>
#include <complex>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <vector>

using namespace std;

#ifdef _MSC_VER
#define __typeof__ decltype
#endif

#define ITER(c)         __typeof__((c).begin())
#define FOREACH(it, c)  for (ITER(c) it=(c).begin(); it != (c).end(); ++it)
#define RITER(c)        __typeof__((c).rbegin())
#define RFOREACH(it, c) for (RITER(c) it=(c).rbegin(); it != (c).rend(); ++it)
#define REP(i, n)       REPEAT(i, 0, n)
#define REPEAT(i, k, n) for (int i = (k); i < (n); ++i)
#define REVREP(i, n)    for (int i = ((n)-1); i >= 0; --i)
#define FIND(c, n)      std::find((c).begin(), (c).end(), (n));
#define BSEARCH(c, n)   std::binary_search((c).begin(), (c).end(), (n))
#define LLPOW(p1,p2)    ((ll)pow((double)(p1), (int)p2))
#define ESIZEOF(A)      (sizeof(A)/sizeof((A)[0]))
#define MIN(p1,p2)      (((p1)<(p2))?(p1):(p2))
#define MAX(p1,p2)      (((p1)>(p2))?(p1):(p2))
#define CIN_NO_SYNC     do { cin.tie(0); ios_base::sync_with_stdio(false); } while(0)
#define GETSTR(p)       fgets((p), sizeof(p), stdin)
#define CHOMP(p)        do{ char *_q = (p) + strlen(p)-1; if(*_q == '\n') *_q = 0; } while(0)

#define GETI1(buf,p1)           do{ GETSTR(buf); sscanf((buf), "%d", &(p1));                          } while(0)
#define GETI2(buf,p1,p2)        do{ GETSTR(buf); sscanf((buf), "%d%d ", &(p1),&(p2));                 } while(0)
#define GETI3(buf,p1,p2,p3)     do{ GETSTR(buf); sscanf((buf), "%d%d%d ", &(p1),&(p2),&(p3));         } while(0)
#define GETI4(buf,p1,p2,p3,p4)  do{ GETSTR(buf); sscanf((buf), "%d%d%d%d ", &(p1),&(p2),&(p3),&(p4)); } while(0)

#ifdef _DEBUG
#define pf printf
#else
#define pf(...) /* */
#endif

typedef long long ll;
typedef unsigned long long ull;

int main(void){

    vector<int> v;
    int n;
    while(cin >> n){
        v.push_back(n);
    }
    sort(v.begin(), v.end(), greater<int>());

    FOREACH(it, v){
        if(it != v.begin()) cout << " ";
        cout << *it;
    }
    cout << endl;

    return 0;
}

C++: #include <stdio.h>
#include <stdlib.h>

int cmp(const void *a, const void *b){
	return -*(int *)a+*(int *)b;
}
int main(void){
	int a[5];
	for(int i=0; i<5; ++i){
		a[i] = 0;
		scanf("%d", a+i);
	}
	qsort(a, 5, sizeof(int), cmp);
	printf("%d %d %d %d %d\n", a[0], a[1], a[2], a[3], a[4]);
	getchar();getchar();
	return 0;
}

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

using namespace std;

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

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

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

	REPR(i, 4)	printf("%d\n", a[i]);

}

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

int a[5];
int main(void){
    rep(i, 5) cin >> a[i];
    sort(a, a+5, greater<int>());
    rep(i, 5) cout << a[i] << " ";
    cout << endl;
}

C++: #include<iostream>
#include<vector>
#include<algorithm>
#include<functional>
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(),greater<int>());
  for(int i=0;i<a.size();++i) cout<<a[i]<<" ";
  cout<<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] << ' ';
	}
	std::cout << '\b' << std::endl;
	return 0;
}

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

int main()
{
  vector<int> in(5);
  for (int i = 0; i < 5; ++i)
    cin >> in[i];

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

  cout << in[0];
  for (int i = 1; i < in.size(); ++i)
    cout << " " << in[i];
  cout << endl;

  return 0;
}

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

int main() {
	int a,b,c,d,e;
	cin>>a>>b>>c>>d>>e;
	int num[]={a,b,c,d,e};
	for(int i=0;i<5;i++)
		for(int j=i+1;j<5;j++)
			if(num[i]<num[j])
				swap(num[i],num[j]);
	for(int i=0;i<5;i++)
		cout<<num[i];
	cout<<endl;
}