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++: /*AOJ 0018*/

#include<iostream>
using namespace std;

#define N 5

void Swap(int *a,int *b){
	int tmp = *a;
	*a = *b;
	*b = tmp;
}

void BabbleSort(int *a){
	for(int i=0;i<N;i++){
		for(int j=N-1;j>i;j--){
			if(a[j] >= a[j-1]){
				Swap(&a[j],&a[j-1]);
			}
		}
	}
}


int main(){

	int a[N];

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

	BabbleSort(a);

	for(int i=0;i<N-1;i++){
		printf("%d ",a[i]);
	}
	printf("%d\n",a[4]);
	return 0;
}

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

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

int main() {
	ios :: sync_with_stdio(false);
	int a[5];
	for(int i = 0; i < 5; i ++)
		cin >> a[i];
	sort(a, a + 5, greater<int>());
	for(int i = 0; i < 5; i ++)
		cout << a[i] << ' ';
	cout << '\n';
	return 0;
}

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

int main()
{
	int array[5];

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

	sort(array, array + 5);

	for (int i = 4; i >= 0; i--){
		if (i == 0){
			cout << array[0] << endl;
		}
		else {
			cout << array[i] << " ";
		}
	}

	return (0);
}

C++: //
//  main.cpp
//  algorithm-practice1
//
//  Created by g-2018 on 2017/04/28.
//  Copyright ?? 2017??´ 3431. All rights reserved.
//

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

int main() {
  //****??´??????
  //**** int a????????£?¨?
  int a[5];
  for(int i=0;i<5;i++){
    cin >> a[i];
    }
  //?????????
  sort(a,a+5);
  
  for(int i=4; i >= 0; i--){
    if( i != 4 ){
      cout << " ";
        }
    //**** ????????????
    cout << a[i];
  }
  cout << endl;
}

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

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

C++: #include<iostream>
using namespace std;
int main(){
	int n[5];
	int tmp;
	for(int i = 0; i<5; ++i) cin >> n[i];	
	for(int i = 0; i<5; ++i) {
		for(int j = i+1; j < 5; ++j) {
			if(n[i] < n[j]){
				tmp = n[i];
				n[i] = n[j];
				n[j] = tmp;
			}
		}
	}
	for(int i = 0; i<5; ++i) cout << n[i] << " ";
    return 0;
}

C++: #include<bits/stdc++.h>
using namespace std;
int main()
{
    int arr[5+2];
   for(int i=0;i<5;i++)
    scanf("%d",&arr[i]);
   sort(arr,arr+5);
   for(int i=4;i>=1;i--)
    cout<<arr[i]<<" ";
    cout<<arr[0]<<endl;
    return 0;
}

C++: #include<iostream>
#include<algorithm>
#include<functional>
using namespace std;
int main(){
	int a[5];
	for(int i=0;i<5;i++) cin>>a[i];
	sort(a,a+5,greater<int>());
	for(int i=0;i<5;i++) cout<<a[i];
}

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 )//a[0]はソート済みだから１から始める
	{
		t = a[i];//ソート済みの部分の次で挿入する数値。
		for( j = i; j > 0 && a[j-1] < t; --j )//ソート済み部分を見る。
		{//探索しつつa[j]を一つづつ下げる。終了条件はj=0かa[j-1]が挿入部分よりも小さいならば
			a[j] = a[j-1];
		}
		a[j] = t;//挿入
	}
	printf("%d",a[0]);
	for(i=1;i<n;i++)
		printf(" %d",a[i]);
	printf("\n");
  return 0;
}

C++: #include <string>
#include <vector>
#include <algorithm>
#include <iostream>
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <queue>
#include <map>
#define INF 100000000

using namespace std;
typedef long long ll;

int main(){
    vector<int> a;
    for(int i=0;i<5;i++){
        int tmp;
        cin>>tmp;
        a.push_back(tmp);
    }
    sort(a.begin(),a.end());
    for(int i=4;i>=0;i--)cout<<a[i]<<" ";
    cout<<endl;
    return 0;
}

C++: #include<iostream>
using namespace std;
int main()
{
    int a[5],temp;
    for(int i=0;i<5;i++)
        {
            cin>>a[i];
        }

    for(int i =0;i<5;i++)
        {
            for(int j=0;j<5;j++)
                {
                    if(a[i]>a[j])
                      {
                            temp = a[i];
                            a[i] = a[j];
                            a[j] = temp;
                      }
                }
        }

                for(int i=0;i<5;i++)
                {
                    if (i==4)
                        cout<<a[i]<<endl;
                    else
                        cout<<a[i]<<" ";
                }

                return 0;
}

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

int main(void){
	double a, b, c, d, e;
	cin >> a >> b >> c >> d >> e;
	vector<double> v;
	v.push_back(a);
	v.push_back(b);
	v.push_back(c);
	v.push_back(d);
	v.push_back(e);
	sort( v.begin(), v.end(), greater<double>() );
	cout << v[0] << ' ' << v[1] << ' ' << v[2] << ' ' << v[3] << ' ' << v[4] << endl;
	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;}


}

C++: #include<iostream>
#include<algorithm>
#include<vector>
#include<stack>
#include<queue>
#include<cstdio>
#include<climits>
#include<cmath>
#include<cstring>
#include<string>
#include<complex>
#include<cfloat>
#include<cassert>

#define f first
#define s second
#define mp make_pair

#define REP(i,n) for(int i=0; i<(int)(n); i++)
#define FOR(i,c) for(__typeof((c).begin()) i=(c).begin(); i!=(c).end(); i++)
#define ALL(c) (c).begin(), (c).end()
#define EPS (1e-10)
using namespace std;

typedef unsigned int uint;
typedef long long ll;
typedef complex<double> P;

#define PI (3.1415926535)
#define EPS (1e-10)

int main(){
  vector<int> v(5);
  REP(i,5) cin>>v[i];
  sort(v.rbegin(),v.rend());
  REP(i,5) cout<<v[i]<<(i==4?'\n':' ');
  return 0;
}

C++: #include<iostream>

using namespace std;

int main() {
	int num[5];
	cin >> num[0] >> num[1] >> num[2] >> num[3] >> num[4];
	for (int i = 0; i < 5; i++) {
		for (int j = 0; j < 5; j++) {
			if (num[i] >= num[j]) {
				int tmp;
				tmp = num[i];
				num[i] = num[j];
				num[j] = tmp;
			}
		}
	}
	for (int i = 0;i<5; i++) {

		if (i != 4) {
			cout << num[i]<<" ";
		}
		else {
			cout << num[i] << endl;
		}
	}
	
}

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

int main(){
   int num[5];
   int M1 = 0, M2 = 0, M3= 0 , M4= 0 , M5 = 0;
   int I1 = 0, I2 = 0, I3= 0 , I4= 0 , I5 = 0 ;
   cin >> num[0] >> num[1] >> num[2] >> num[3] >> num[4] ;

   for(int i=0 ; i < 5; i++){
      if(M1 < nim[i]) {
          M1 = num[i];
          I1 = i;
       }
    }

    for(int i=0 ; i < 5; i++){
        if(i == I1 ) continue;
        if(M2 < nim[i]) {
           M2 = num[i];
           I2 = i;
        }
     }

for(int i=0 ; i < 5; i++){
if(i == I1 || i == I2 ) continue;
if(M3 < nim[i]) {
M3 = num[i];
I3 = i;
}
}

for(int i=0 ; i < 5; i++){
if( i == I1 || i == I2 || i == I3 ) continue;
if(M4 < nim[i]) {
M4 = num[i];
I4 = i;
}
}

for(int i=0 ; i < 5; i++){
if( i == I1 || i == I2 || i == I3 || i == I4 ) continue;
if(M5 < nim[i]) {
M5 = num[i];
I5 = i;
}
}

cout << M1 << " " << M2 << " " << M3 << " " << M4 << " " << M5 << endl;

return 0 ;
}