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 <stdio.h>
void qsort(int a[],int left,int right)
{
	if(left < right)
	{
		int pvot,tmp,i,j;
		i = left;
		j = right;
		pvot = (a[i] + a[j])/2;
		while(1)
		{
			while(a[i] < pvot)i++;
			while(a[j] > pvot)j--;
			if(i >= j)
			{
				break;
			}
			tmp = a[i];
			a[i] = a[j];
			a[j] = tmp;
			i++;
			j--;
		}
		qsort(a,left,i -1);
		qsort(a,j + 1,right);
	}
	return;
}
int main(void)
{
	int i,n;
	int array[5];
	for(i = 0;i < 5;i++)
	{
		scanf("%d",&array[i]);
	}
	qsort(array,0,4);
	for(i = 0;i < 4;i++)
	{
		printf("%d ",array[4-i]);
	}
	printf("%d\n",array[0]);
	return 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 = 0;i < 4;i++)cout << a[i] << " ";
	cout << a[4] << endl;
	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+4);
  
  for(int i=4; i >= 0; i--){
    if( i != 4 ){
      cout << " ";
        }
    //**** ????????????
    cout << a[i];
  }
  cout << endl;
}

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

using namespace std;

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

int a[5];

int main(){
	REP(i,5){
		cin>>a[i];
	}
	sort(a,a+5);
	REP(i,5){
		if (i) cout<<" ";
		cout<<a[4-i];
	}
	cout<<endl;
	return 0;
}

C++: #include <iostream>
using namespace std;
void swap(int *x, int *y)
{
	int tmp = *x;
	*x = *y;
	*y = tmp;
}

void sort(int date[], int n)
{
	int k = n-1;
	while(k>=0){
		int i,j;
		for (i=1, j=-1; i <=k; i++)
			if(date[i-1] < date[i]) {
				j = i-1;
				swap(&date[i], &date[j]);
			}
		k = j;
	}
}

int main(void)
{
	int n[5];
	while(cin >> n[0]){
		for(int i = 1; i < 5; i++){
			cin >> n[i];
		}
		sort(n, 5);
		for(int i=0; i<5; i++){
			cout << n[i];
			if(i!=5) cout << " "; 
		}
		cout << endl;
	}
	return(0);
}

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

int main(int argc, const char * argv[])
{
    int data[5];
    for (int i = 0; i < 5; i++) {
        cin >> data[i];
    }
    sort(&data[0],&data[5]);
    for (int i = 4; 0 <= i; i--) {
        cout << data[i];
        (i != 0)? cout << " ": cout << endl;
    }
    return 0;
}

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

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

C++: #include<iostream>
using namespace std;
int main(void)
{
    int num[6],sta;
    for(int i=0;i<5;i++){
        cin>>num[i];
    }
    for(int i=0;i<4;i++){
        for(int j=0;j<4;j++){
            if(num[j]>num[j+1]){
                sta=num[j];
                num[j]=num[j+1];
                num[j+1]=sta;
            }
        }
    }
    for(int i=0;i<5;i++){
        cout<<num[i];
        if(i==4)cout<<"\n";
        else cout<<" ";
    }
}

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

int main(){
  vector<int> n(5);

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

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

  for(int i=0; i<n.size(); i++) {
    cout << n[i] << " ";
  }
  cout << "\n";

  return 0;
}

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

using namespace std;

int main() {
  while(!feof(stdin)) {
    int n, tmp, data[5];
    for(int i=0;i<5;i++) scanf("%d", &data[i]);
    if(feof(stdin)) break;
    for(int i=4;i>0;i--) {
      for(int j=0;j<i;j++) {
	if(data[j]<data[j+1]) {
	  tmp=data[j+1]; data[j+1]=data[j]; data[j]=tmp;
	}
      }
    }
      printf("%d %d %d %d %d\n",data[0], data[1], data[2], data[3], data[4]);
  }
}