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 <cstdio>
#include <deque>
#include <functional>

using namespace std;

int main(void)
{
	int a,b,c,d,e;
	while(cin>>a>>b>>c>>d>>e)
	{
		deque<int> nums;
		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>() );
		deque<int>::iterator it = nums.begin();
		while( it != nums.end() )
		{
			cout<<*it<<" ";
			++it;
		}
		cout<<endl;
	}
	return 0;
}

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() << ' ';
		q.pop();
	}
	return 0;
}

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

int main(){
int a;
int b[5];
int c;
int d;
int e;
c=0;
while(c<5){
b[c]=0;
c=c+1;
}
c=0;
while(c<5){
cin >>a;
d=0;
while(1){if(a>=b[d]){e=3; if(e>=d){while(e>=d){b[e+1]=b[e]; e=e-1;}} b[d]=a; break;} d=d+1;     }
c=c+1;
}
c=0;
while(c<5){
cout << b[c]
if(c<4){cout <<" ";}
c=c+1;}
cout << endl;

}

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

#define REP(i,n) for(int i = 0; i < (n); ++i)
using namespace std;

int main(){
	vector<int> ret;
	int a;
	while(cin>>a) ret.push_back(a);
	sort(ret.begin(), ret.end() ,greater<int>());
	REP(i, ret.size()) {
		cout<<ret[i];
		if (i != ret.size() -1)
		{
			cout << " ";
		}
	}
	return 0;
}

C++: #include <iostream>
#include <algorithm>
#include <complex>
#include <cassert>
#include <vector>
#include <iomanip>

using namespace std;

typedef complex<double> P;

#define all(c) (c).begin(), (c).end()
#define loop(i,a,b) for(int i=(a); i<(int)(b); i++)
#define rep(i,b) loop(i,0,b)

const double eps = 1e-10;

double cross(const P& a, const P& b) {
    return imag(conj(a)*b);
}
double dot(const P& a, const P& b) {
    return real(conj(a)*b);
}

struct L : public vector<P> {
    L(const P &a, const P &b) {
        push_back(a); push_back(b);
    }
};

P crosspoint(const L &l, const L &m) {
    double A = cross(l[1] - l[0], m[1] - m[0]);
    double B = cross(l[1] - l[0], l[1] - m[0]);
    if (abs(A) < eps && abs(B) < eps) return m[0]; // same line
    if (abs(A) < eps) assert(false); // !!!PRECONDITION NOT SATISFIED!!!
    return m[0] + B / A * (m[1] - m[0]);
}

typedef vector<int> vi;
int main(){
    vi a(5);
    rep(i, 5) cin >> a[i];
    sort(all(a));
    cout << a[4];
    rep(i, 4){
        cout << " " << a[3 - i];
    }
}

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

int main(void){


    vector<int> array(5,0);

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

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

    for(int i = 0;i < 5;i++){
        cout << array[i] << " " ;
    }
    cout << endl;

    return 0;
}

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

using namespace std;

int main() {
    int arr[5];
    for(int i = 0; i < 5; ++i) cin >> arr[i];
    sort(arr, arr+5);
    for(int i = 0; i < 5; ++i) cout << arr[i] << ' ';
    cout << endl;
    return 0;
}

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

int a[5];

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

C++: #include <stdio.h>

int main(){
	int num[5];
	int i,j;
	int key;
	int mini = 0;
	
	scanf("%d %d %d %d %d",&num[0],&num[1],&num[2],&num[3],&num[4]);

	for(i = 0;i < 5 ;i++){
		key = num[i];
		mini = i;
		for(j = i;j < 5;j++){
			if(key > num[j]){
				key = num[j];
				mini = j;
			}
		}
		num[mini] = num[i];
		num[i] = key;
	}
	
	for(i = 0;i < 5;i++){
		if(i < 4){
			printf("%d ",num[4-i]);
		}else{
			printf("%d\n",num[0]);
		}
	}
	
	return 0;
}

C++: #include<iostream>
#include<iomanip>
#include<algorithm>
#include<cctype>
#include<cmath>
#include<cstdio>
#include<set>
#include<stack>
#include<string>
#include<sstream>
#include<map>
#include<queue>
#include<vector>

using namespace std;

int main() {
	long long int a,b,c,d,e;
	int s[5];
	cin >> a>>b>>c>>d>>e;
	s[0]=a;
	s[1]=b;
	s[2]=c;
	s[3]=d;
	s[4]=e;
	for(int i=4;i>0;i--)
		cout << s[i] << " ";
	cout << s[0] <<endl;
	
	return 0;
}

C++: #include<stdio.h>
#define n 5

int main(void)
{
	int a[n],i,j,t;

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

	for( i = 1; i < n; ++i )
	{
		t = a[i];
		for( j = i; j > 0 && a[j-1] > t; --j )
		{
			a[j] = a[j-1];
		}
		a[j] = t;
	}
	for(i=0;i<n;i++)
		printf("%d ",a[i]);
	printf("\n");
  return 0;
}

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

int main(){
    int n,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<<endl;
}

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

using namespace std;

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

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

typedef long long int ll;
typedef pair<int, int> pii;
typedef vector<int> vi;
typedef vector<pair<int, int> > vii;
#define rrep(i, m, n) for(int (i)=(m); (i)<(n);  (i)++)
#define  rep(i, n)    for(int (i)=0; (i)<(n);  (i)++)
#define  rev(i, n)    for(int (i)=(n)-1; (i)>=0; (i)--)
#define vrep(i, c)    for(__typeof((c).begin())i=(c).begin(); i!=(c).end(); i++)
#define  ALL(v)       (v).begin(), (v).end()
#define mp            make_pair
#define pb            push_back
template<class T1, class T2> inline void minup(T1& m, T2 x){ if(m>x) m=static_cast<T2>(x); }
template<class T1, class T2> inline void maxup(T1& m, T2 x){ if(m<x) m=static_cast<T2>(x); }

#define INF 1000000000
#define MOD 1000000009
#define EPS 1E-9

int a[5];

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

  sort(a, a+5, greater<int>());

  rep(i, 5) cout << a[i] << " "; cout << endl;

  return 0;
}

C++: #include<iostream>
using namespace std;
int main()
{
	int a, b, c, d, e, x[5], i, j, y;
	cin >> a >> b >> c >> d >> e;
	x[0] = a;
	x[1] = b;
	x[2] = c;
	x[3] = d;
	x[4] = e;
	for ( j = 0;j < 5; j++)
	{	for ( i = 0;i < 4; i++)
		{
			if (x[i] < x[i + 1])
				{
					y = x[i + 1];
					x[i + 1] = x[i];
					x[i] = y;
				}
		}
	}
	cout << x[0] << " " <<x[1] << " " << x[2] << " " << x[3] << " " << x[4] << endl;
return 0;
}

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

int main(){
	vector<int> nums;
	for( int i=0; i<5; i++ ){
		int n;
		cin >> n;
		nums.push_back(n);
	}
	sort( nums.rbegin(), nums.rend() );
	for( int i=0; i<4; i++ ){
		cout << nums[i] << " ";
	}
	cout << nums[4] << endl;
	return 0;
}

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