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 <stdio.h>
#include <string>
#include <vector>
using namespace std;
long long int a[5],fir=-1000000,sec=-1000000,thi=-1000000,fou=-1000000,fif=-1000000;
int main(){
    for(int i=0;i<5;i++){
    cin>>a[i];
    if(a[i]>=fir){
	fif=fou;
	fou=thi;
    thi=sec;
    sec=fir;
    fir=a[i];}else
    if(a[i]>=sec){
	fif=fou;
	fou=thi;
    thi=sec;
    sec=a[i];}else
    if(a[i]>=thi){
	fif=fou;
	fou=thi;
    thi=a[i];}else
    if(a[i]>=fou){
	fif=fou;
    fou=a[i];}else
	{fif=a[i];}
	}
    cout<<fir<<" "<<sec<<" "<<thi<<" "<<fou<<" "<<fif<<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] << " ";
	cout << endl;
    return 0;
}

C++: #include<iostream>
#include<algorithm>
using namespace std;
int a[5];

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


	return 0;
}

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

void quicksort(int x[10],int first,int last){
    int pivot,j,temp,i;

     if(first<last){
         pivot=first;
         i=first;
         j=last;

         while(i<j){
             while(x[i]>=x[pivot]&&i<last)
                 i++;
             while(x[j]<x[pivot])
                 j--;
             if(i<j){
                 temp=x[i];
                  x[i]=x[j];
                  x[j]=temp;
             }
         }

         temp=x[pivot];
         x[pivot]=x[j];
         x[j]=temp;
         quicksort(x,first,j-1);
         quicksort(x,j+1,last);

    }
}

int main()
{
    int a[6];
    for(int i=0;i<5;i++)
        scanf("%d",&a[i]);

    quicksort(a,0,4);

    for(int i=0;i<5;i++)
        printf("%d ",a[i]);

    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);

	cout << a[4];
	for(int m=3; 0<=m; m--){
		cout << " " << a[m];
	}
	cout << endl;
}

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

int main()
{
    int Number[5];
    int Temp;

    while(cin >> Number[0] >> Number[1] >> Number[2] >> Number[3] >> Number[4])
    {
        for(int x = 0; x < 10; x++)
        {
            for(int z = 0; z < 5; z++)
            {
                if(Number[z] < Number[z+1])
                {
                    Temp = Number[z+1];
                    Number[z+1] = Number[z];
                    Number[z] = Temp;
                }
            }
        }

        for(int y = 0; y <4; y++)
        {
            cout << Number[y] << " ";
        }
        cout<<Number[4];
		printf("\n");

    }
	return 0;
}

C++: #include<iostream>
#include<algorithm>
using namespace std;
int a[5];

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


	return 0;
}

C++: #include <iostream>

int main() {
	const int size = 5;
	int arr[size];
	std::cin
		>> arr[0]
		>> arr[1]
		>> arr[2]
		>> arr[3]
		>> arr[4];

	// sort
	for (int i = 0; i < size; i++)
		for (int j = i + 1; j < size; j++)
			if (arr[i] < arr[j]) {
				std::swap(arr[i], arr[j]);
			}
			

	// show
	for (int i = 0; i < size - 1; i++)
		std::cout << arr[i] << " ";
	
	std::cout << arr[4] << std::endl;
}

C++: #include <iostream>
#include <string>
#include <algorithm>
using namespace std;
 
int main(){
	cin.tie(0);
	ios::sync_with_stdio(false);
	
	int array[5];
	for(int i = 0; i < 5; ++i){
		cin >> array[i];
	}
	
	sort(array, array + 5);
	
	for(int i = 4; i >= 0; --i){
		cout << array[i];
		if(i != 0)
			cout << ' ';
	}
	cout << endl;
	
	return 0;
}

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

int main() {
 int n[5];
 cin >> n[0] >> n[1] >> n[2] >> n[3] >> n[4];
 for (int i=4;i>=1;i--) for (int j=0;j<i;j++) if (n[j]<n[j+1]) swap(n[j],n[j+1]);
 cout << n[0] << " " << n[1] << " " << n[2] << " " << n[3] << " " << n[4] << 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];
		if (i != 4)
		{
			std::cout << ' ';
		}
	}
	std::cout << std::endl;
	return 0;
}

C++: #include <iostream>
#include <cstdio>
#include <algorithm>
#include <cassert>
#include <vector>
#include <string>
#include <cmath>
#include <map> 
#include <sstream>
#include <cstdio>
#include <complex>
#include <cstring>
using namespace std;
 
const int MAX= 10000100;

#define loop(i,a,b) for(int i = a ; i < b ; i ++)
#define rep(i,a) loop(i,0,a)
#define all(a) (a).begin(),(a).end()
#define ll long long int
#define gcd(a,b) __gcd(a,b)
#define pb(a) push_back(a)
int GCD(int a, int b) {if(!b) return a; return gcd(b, a%b);}
int lcm(int a, int b) {return a*b / gcd(a, b);}

int main(void){
  int a[5];
  rep(i,5)cin>>a[i];
  sort(a,a+5,greater<int>());
  rep(i,5)cout<<a[i]<<(i!=4?' ':'\n');
}