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<algorithm>
using namespace std;
int main() {
  int v[5];
  for(int i = 0; i < 5; i++) cin >> v[i];
  sort( v, v + 5 );
  reverse(v, v + 5);
  cout << v[0];
  for(int i = 1; i < 5; i++) cout << " " << v[i];
}

C++: //0018 Sorting Five Numbers
//®a,b,c,d,eªüÍ³ê½Æ«A~É®ñµÄoÍ·évOðì¬¹æ

//±ñÈsort()Ä×ÎIíéæ¤ÈâèAVÎÈ¢Æ¹¶áÈ¢

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

int main(void)
{
	const int N = 5;
	int a[N];
	int i;

	//µå¤ªÈ¢©çÉÊÉ
	for(i = 0; i < N; i++)
		cin >> a[i];
	sort(a, a+N, greater<int>());
	for(i = 0; i < N; i++)
		(i ? cout<<' '<<a[i] : cout<<a[i]);
	cout << endl;

	/*
	//±êAVC++¾ÆRpCÅ«éÌÉñoµ½çRpCG[HçÁ½
	//[JNXÍn¹È¢ñ¾Á¯
	struct X
	{
		int operator()(int) { int a;cin >> a;return a;}
	};
	struct Y
	{
		int n;
		Y():n(0){}
		void operator()(int a) { (n++?cout<<' '<<a:cout<<a);}
	};
	transform(a, a+N, a, X());
	sort(a, a+N, greater<int>());
	for_each(a, a+N, Y());
	cout << endl;
	*/

	/*
	//±ê¾ÆAüÍÉEOFªKvÅAoÍÉXy[Xª½­ÈÁÄµÜ¤
	copy(istream_iterator<int>(cin), istream_iterator<int>(), a);
	sort(a, a+N, greater<int>());
	copy(a, a+N, ostream_iterator<int>(cout, " "));
	*/
	return 0;
}

C++: ??? #include <iostream>
using namespace std;
int main(){
	int number[6] , i , j , ans[6] ;
	for( i=1 ; i<=5 ; i++ )
		cin >> number[i] ;
	for( i=1 ; i<=5 ; i++ ){
		for( j=i ; j<=5 ; j++ ){
			if( number[i] < number[j] )
				swap( number[i] , number[j] );
		}
		ans[i] = number[i];
		cout << ans[i] <<" ";
	}
}

C++: 
#include<stdio.h>

int Counting_sort(int A[], int k, int n)
{
    int i, j;
    int B[15], C[100];
    for(i = 0; i <= k; i++)
            C[i] = 0;
    for(j =1; j <= 5; j++)
            C[A[j]] = C[A[j]] + 1;
    for(i = 1; i <= k; i++)
            C[i] = C[i] + C[i-1];
    for(j = n; j >= 1; j--)
    {
            B[C[A[j]]] = A[j];
            C[A[j]] = C[A[j]] - 1;
    }

    for(i = 5; i >=1; i--)
          printf("%d  ",B[i]);
}

int main()
{
    int n,i,k = 0, A[15];
    for ( i = 1; i <= 5; i++)
    {
         scanf("%d",&A[i]);
         if(A[i] > k)
         {
            k = A[i];
         }
    }
    Counting_sort(A, k, 5);
     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);
    for (int i = 4; 0 <= i; --i)
        cout << ((i!=0)? " ": "") << a[i];
    cout << endl;
    return 0;
}

C++: #include <iostream>

using namespace std;

int main()
{
    int a[5];
    for (int i = 0; i < 5; i++) {
        cin >> a[i];
    }
    for (int i = 4; i > 0; i--) {
        for (int j = 0; j < i; j++) {
            if (a[j] < a[j+1]) {
                swap(a[j], a[j+1]);
            }
        }
    }
    
    for (int i = 0; i < 5; i++) {
        if (i > 0) cout << " ";
        cout << a[i];
    }
    cout << endl;
    return 0;
}

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

int main()
{
	vector<int> n;
	int x;
	for (int i = 0; i < 5; ++i){
		cin >> x;
		n.push_back(x);
	}

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

	for (int i = 0; i < 5; ++i){
		cout << n[i];
		if (i != 4)
			cout << " ";
		else
			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 << std::endl;
	return 0;
}

C++: #include<bits/stdc++.h>
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 = 4;i >= 0;i--){
    cout << a[i];
    if(i == 0) cout << endl;
    else cout << " ";
  }
  return 0;
}

C++: #include <stdio.h>

int main()
{
	int a[5], t;

	scanf("%d %d %d %d %d", &a[0], &a[1], &a[2], &a[3], &a[4]);

	for (int i = 0; i < 5; ++i){
		for (int i = 0; i < 4; i++){
			if(a[i] < a[i+1]){
				t = a[i];
				a[i] = a[i+1];
				a[i+1] = t;
			}
		}
	}

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

	return 0;
}

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

int main(){
int a,b,c,d,e;
int A,B,C,D,E;
cin>>a>>b>>c>>d>>E;
if(a>b){
A=a;
B=b;}
else{
A=b;
B=a;}
if(c<B){
C=c;}
else{
C=B;
if(c<A){
B=c;}
else{
B=A;
A=c;}}
if(d<C){
D=d;}
else{
D=C;
if(d<B){
C=d;}
else{
C=B;
if(d<A){
B=d;}
else{
B=A;
A=d;}}}
if(e<D){
E=e;
else{
E=D;
if(e<C){
D=e;}
else{
D=C;
if(e<B){
C=e;}
else{
C=B;
if(e<A){
B=e;}
else{
B=A;
A=e;}}}}
cout<<A<<" "<<B<<" "<<C<<" "<<D<<" "<<E;
}

C++: #include<iostream>
using namespace std;
int main() {
	int a[11];
	for (int i = 1; i <= 5; i++) {
		cin >> a[i];
	}
	int dai = -999999;
	int o;
	for (int i = 1; i <= 5; i++) {
		int dai = -999999;
		for (int z = 1; z <= 5; z++) {
			if (dai <= a[z]) {
				dai = a[z];
				o = z;
			}
		}
		a[o] = -9999999;
		cout << dai<<" ";
	}
}

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

int main(){
int a,b,c,d,e;
int A,B,C,D,E;
cin>>a>>b>>c>>d>>e;
if(a>b){
A=a;
B=b;}
else{
A=b;
B=a;}
if(c<B){
C=c;}
else{
C=B;
if(c<A){
B=c;}
else{
B=A;
A=c;}}
if(d<C){
D=d;}
else{
D=C;
if(d<B){
C=d;}
else{
C=B;
if(d<A){
B=d;}
else{
B=A;
A=d;}}}
if(e<D){
	E=e;}
else{
E=D;
if(e<C){
D=e;}
else{
D=C;
if(e<B){
C=e;}
else{
C=B;
if(e<A){
B=e;}
else{
B=A;
A=e;}}}}
cout<<A<<" "<<B<<" "<<C<<" "<<D<<" "<<E;
}

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

int main() {
	int a[5+1];

	for (int i = 1; i <= 5; i++) 
		cin >> a[i];

	for (int j = 2; j <= 5; j++) {
		int key = a[j];
		int i = j-1;
		while (i >= 1 && a[i] < key) {
			a[i+1] = a[i];
			i--;
		}
		a[i+1] = key;
	}

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

	return 0;
}

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

using namespace std;

int cell[5];

int main() {
    cin >> cell[0] >> cell[1] >> cell[2] >> cell[3] >> cell[4];

    sort(cell, cell + 5);

    cout << cell[4] << " " << cell[3] << " " << cell[2] << " " << cell[1] << " " << cell[0] << endl;

    return 0;
}

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

int main(void) {
  int ary[5], i;

  for (i = 0; i < 5; i++) {
    std::cin >> ary[i];
  }

  std::sort(ary, ary + 5, std::greater<int>());

  for (i = 0; i < 5; i++) {
    std::cout << ary[i] << ' ';
  }

  return 0;
}

C++: #include <iostream>
#include <algorithm>
 
using namespace std;
 
int main(void) {
  int n[5];

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

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

  cout<<n[0]<<" "<<n[1]<<" "<<n[2]<<" "<<n[3]<<" "<<n[4]<<" "<<endl;
  return 0;
}

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

using namespace std;

int main(int argc, char *argv[]) {
  int nums[5];

  for (int i = 0; i < 5; i++)
    cin >> nums[i];

  sort(nums, nums + 5);

  for (int i = 0; i < 5; i++)
    cout << nums[4 - i] << ' ';
  cout << '\b' << endl;
  return 0;
}