Go: package main

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

var scanner = bufio.NewScanner(os.Stdin)

func nextString() string {
	scanner.Scan()
	return scanner.Text()
}

func nextInt() int {
	n, err := strconv.Atoi(nextString())
	if err != nil {
		fmt.Printf("strconv.Atoi failed: %v\n", err)
	}
	return n
}

func main() {
	scanner.Split(bufio.ScanWords)

	n := 5
	array := make([]int, n)
	for i := 0; i < n; i++ {
		array[i] = nextInt()
	}
	sort.Slice(array, func(i, j int) bool { return array[i] > array[j] })
	arrayStr := fmt.Sprint(array)
	l := len(arrayStr)
	fmt.Println(arrayStr[1:(l - 1)])
}

C++: #include <iostream>
#include <vector>
#include <string>
#include <stack>
#include <queue>
#include <deque>
#include <set>
#include <map>
#include <algorithm>	// require sort next_permutation count __gcd reverse etc.
#include <cstdlib>	// require abs exit atof atoi 
#include <cstdio>		// require scanf printf
#include <functional>
#include <numeric>	// require accumulate
#include <cmath>		// require fabs
#include <climits>
#include <limits>
#include <cfloat>
#include <iomanip>	// require setw
#include <sstream>	// require stringstream 
#include <cstring>	// require memset
#include <cctype>		// require tolower, toupper
#include <fstream>	// require freopen
#include <ctime>		// require srand
#define rep(i,n) for(int i=0;i<(n);i++)
#define ALL(A) A.begin(), A.end()

using namespace std;

typedef long long ll;
typedef pair<int, int> P;

int main()
{
//	cut here before submit 
//	freopen ("testcase.SFN", "r", stdin );
	string str = "";
	while (getline (cin, str ) ){
		vector<int> a (5, 0 );
		stringstream ss (str );
		for (int i = 0; ss >> a[i]; i++ );
		sort (ALL (a ), greater<int>() );
		rep (i, 5 ){
			cout << a[i] << (i != 4 ? ' ' : '\n' );
		} // end rep
	} // end loop
		
	return 0;
}

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

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

C++: //include
//------------------------------------------
#include <vector>
#include <list>
#include <map>
#include <set>
#include <deque>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <queue>
#include <iterator>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <cctype>
#include <string>
#include <cstring>
#include <ctime>

using namespace std;

//conversion
//------------------------------------------
inline int toInt(string s) {int v; istringstream sin(s);sin>>v;return v;}
template<class T> inline string toString(T x) {ostringstream sout;sout<<x;return sout.str();}

//math
//-------------------------------------------
template<class T> inline T sqr(T x) {return x*x;}

//typedef
//------------------------------------------
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector<string> VS;
typedef pair<int, int> PII;
typedef long long LL;

//container util
//------------------------------------------
#define ALL(a)  (a).begin(),(a).end()
#define RALL(a) (a).rbegin(), (a).rend()
#define PB push_back
#define MP make_pair
#define SZ(a) int((a).size())
#define EACH(i,c) for(typeof((c).begin()) i=(c).begin(); i!=(c).end(); ++i)
#define EXIST(s,e) ((s).find(e)!=(s).end())
#define SORT(c) sort((c).begin(),(c).end())

//repetition
//------------------------------------------
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define REP(i,n)  FOR(i,0,n)

//constant
//--------------------------------------------
const double EPS = 1e-10;
const double PI  = acos(-1.0);

//clear memory
#define CLR(a) memset((a), 0 ,sizeof(a))

//debug
#define dump(x)  cerr << #x << " = " << (x) << endl;
#define debug(x) cerr << #x << " = " << (x) << " (L" << __LINE__ << ")" << " " << __FILE__ << endl;

int gcd(int a, int b){
   int tmp;
   while(a%b==0){
      tmp=a%b;
      a=b;
      b=tmp;
   }
}

int lcm(int a,int b){
   return a*b/gcd(a,b);
}

bool prime_number(int n){
   if(n < 2){
      return false;
   }
   else if(n == 2){
      return true;
   }
   if(n % 2 == 0){
      return false;
   }
   for(int i=3;i<=n/i;i+=2){
      if(n % i == 0) return false;
      return true;
   }
}

int main(){
   VI a;
   int x;
   REP(i,5){
      cin >> x;
      a.PB(x);
   }
   SORT(a);
   REP(i,5){
      cout << a[4-i];
      if(i!=4) cout << " ";
   }
   cout << endl;
   return 0;
}

C++: #include<iostream>
#include<string>
#include<algorithm>
using namespace std;
int a[5];
int main()
{
	for (int i = 0; i < 5; i++) {
		cin >> a[i];
	}
	sort(a, a + 5, std::greater<int>());
	//reverse(a, a + 5);
	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>
using namespace std;
int main()
{
	double a[5];
	for (int i = 0; i < 5; i++)
	{
		cin >> a[i];
	}
	sort(a, a + 5);
	cout << a[4] << " ";
	cout << a[3] << " ";
	cout << a[2] << " ";
	cout << a[1] << " ";
	cout << a[0] << endl;;

	return 0;
}

C++: #include<iostream>
#include<queue>
#include<string>
#include<stack>
#include<cstdio>
#include<algorithm>

using namespace std;

int main(void)
{
  int a[5];

  cin>>a[0]>>a[1]>>a[2]>>a[3]>>a[4];

  sort(a,a+5);

  printf("%d %d %d %d %d\n", a[4],a[3],a[2],a[1],a[0]);

}

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

int main()
{
  int a[5];
  int temp;
  cin >> a[0] >> a[1] >> a[2] >> a[3] >> a[4];

  for(int i=0; i<4; i++){
    for(int j=1; j<5; j++){
      if( a[i]<a[j] ){
      temp = a[i];
      a[i] = a[j];
      a[j] = temp;
      }
    }
  }
  cout << a[0] << " " << a[1] << " " << a[2] << " " << a[3] << " " << a[4] << 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<iostream>
#include<vector>
#include<algorithm>
using namespace std;
int main(){
  vector<int> lot(5);
  for(int i=0; i<5; i++) cin >>lot[i];
  sort(lot.begin(),lot.end());
  for(int i=0; i<5; i++){
    cout <<lot[4-i];
    if(i == 4) cout <<endl;
    else cout <<" ";
  }
  return 0;
}

C++: require 'set'

class PriorityQueue < SortedSet
  @@id = 0

  def << obj
    add obj
  end

  def add obj
    super([obj,@@id])
    @@id+=1
  end

  def at idx
    super idx
  end

  def top
    self.min[0]
  end

  def pop
    self.delete(self.min)
  end
end

s = PriorityQueue.new

input = gets.split(' ').map(&:to_i)

for i in input
  s << i
end

arr = []
5.times do
  arr << s.top
  s.pop
end

puts arr.reverse.join(' ')

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] << " ";
  }
  cout << "\b" << endl;
  return 0;
}