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++: #include<iostream>
#include<algorithm>
#include <functional>
using namespace std;
int main(){
	int d[6]={};
	for(int i=0;i<5;i++){
		cin>>d[i];
	}
	sort(d,d+5,greater<int>());
	for(int i=0;i<5;i++){
		cout<<d[i]<<" ";
	}
	
	return 0;
}

C++: #include <iostream>
#include <algorithm>
#include <vector>
#include <stack>
#include <queue>
#include <map>
#include <cmath>
#include <string>
#include <sstream>
#include <iomanip>
#include <complex>
using namespace std;

#define ll long long
#define vvi vector< vector<int> >
#define All(X) X.begin(),X.end()
#define FOR(i,a,b) for(int i=(int)(a);i<(int)(b);i++)
#define REP(i,n) for(int i=0;i<(int)(n);i++)
#define pb push_back 
ll gcd(ll a,ll b){return b?gcd(b,a%b):a;}
ll lcm(ll a,ll b){return a/gcd(a,b)*b;}

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

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 << '\b' << std::endl;
	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=4;i>=0;i--){
		cout<<a[i];
		if(i!=0){
			cout<<" ";
		}
	}
	cout<<endl;
}

C++: #include<stdio.h>
#include<string>
#include<stdlib.h>
#include<math.h>
#include<iostream>
#include<vector>
#include<algorithm>
#include<numeric>
#include<string.h>
#include<map>
#include<queue>

using namespace std;

typedef pair<int,int> pii;

#define rep(i,j) for(int i=0;i<(j);i++)
#define reps(i,j,k) for(int i=j;i<=k;i++)
#define in(i,j,k) ((i)>=(j)&&(i)<=(k))


int main(){
	int n[5];
	rep(i,5)scanf("%d",n+i);
	sort(n,n+5);
	rep(i,5)printf("%d%c",n[4-i],i<4?' ':'\n');
	return 0;
}

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

int main(){
	int a[5];
	int p;
	int temp;
	int i,j;
	int min;
	int minin;
	cin >> a[0] >> a[1] >> a[2] >> a[3] >> a[4];
	for(i=0;i<5;i++){
		min = a[i];
		minin = i;
		for(j=i+1;j<5;j++){
			if(min > a[j]){
				min = a[j];
				minin = j;
			}
		}
		temp = a[i];
		a[i] = a[minin];
		a[minin] = temp;
	}
	cout << a[0];
	for(i=1;i<5;i++){
		cout << " " << a[i];
	}
	cout << endl;
	return 0;
}

C++: #include<bits/stdc++.h>
using namespace std;
int main(void){
	int box[5];
	int i,j;
	
	for(i=0;i<5;i++)	cin>>box[i];
	for(i=0;i<4;i++){
		for(j=i+1;j<5;j++){
			if(box[i]<box[j])	swap(box[i],box[j]);
		}
	}
	for(i=0;i<5;i++){
		if(i)	cout<<" ";
		cout<<box[i];
	}
	cout<<endl;
	return 0;
}

C++: #include<iostream>

using namespace std;

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

  for(int i=0;i<5;i++){
    for(int j=i;j<5;j++){
      if(a[i]<a[j]){
	swap(a[i],a[j]);
      }
    }
  }
  for(int i=0;i<4;i++)
    cout<<a[i]<<' ';
  cout<<a[4]<<"\n";
}

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

using namespace std;

bool descend(int i, int j) { return (i < j); }

int main()
{
    int input[5];

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

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

    for (int i = 0; i < 5; i++)
        cout << input[i] << " ";
    cout << endl;

    return 0;
}

C++: import java.util.*;

public class Main {
	void run() {
		Scanner sc = new Scanner(System.in);
		
		int[] num = new int [5];
		for (int i=0;i<5;i++) {
			num[i] = sc.nextInt();
		}
		Arrays.sort(num);
		
		for (int i=num.length-1;i>=0;i--) {
			System.out.print(num[i]);
			if (i != 0)System.out.print(" ");
			else System.out.println();
		}
	}
	
	public static void main (String[] args) {
		new Main().run();
	}
}

C++: #include <iostream>
#include <sstream>
#include <iomanip>
#include <algorithm>
#include <cmath>
#include <string>
#include <vector>
#include <list>
#include <queue>
#include <stack>
#include <set>
#include <map>
#include <bitset>
#include <numeric>
#include <climits>
#include <cfloat>
using namespace std;

int main()
{
    vector<int> a(5);
    for(int i=0; i<5; ++i)
        cin >> a[i];
    sort(a.rbegin(), a.rend());

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

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

int main ()
{
    int n,a[100],i;
    for(i=0;i<5;i++)
    {
        cin>>a[i];
    }
    sort(a,a+5);
    int f=0;
    for(i=4;i>=0;i--)
    {
        if(f==0)
        {cout<<a[i]; f=1;}
        else
            cout<<" "<<a[i];

    }
    return 0;
}

C++: #include<stdio.h>

int main(void)
{
	int a,b,c,d,e,x[5],t=0;
	scanf("%d %d %d %d %d",&a,&b,&c,&d,&e);

	for(t;t<5;t++)
	if(a>=b&&a>=c&&a>=d&&a>=e)
	{
		x[t]=a;
		a=-1;
	}
	else if(b>=c&&b>=d&&b>=e)
	{
		x[t]=b;
		b=-1;
	}
	else if(c>=d&&c>=e)
	{
		x[t]=c;
		c=-1;
	}
	else if(d>=e)
	{
		x[t]=d;
		d=-1;
	}
	else
	{
		x[t]=e;
		e=-1;
	}

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

C++: #include <stdio.h>

int main ()

{

    int number[30];

    int i, j, a;



    for (i = 0; i < 5; ++i){

    scanf("%d", &number[i]);
}

    for (i = 0; i < 5; ++i)

    {

        for (j = i + 1; j < 5; ++j)

        {

            if (number[i] < number[j])

            {

                a = number[i];

                number[i] = number[j];

                number[j] = a;

            }

        }

    }

    for (i = 0; i < 5; ++i)

    {

        printf("%d ", number[i]);

    }

}

C++: #include<iostream>
#include<algorithm>
using namespace std;
int main(){
	long long a[5],i;
	for(i=0;i<5;i++)cin>>a[i];
	for(i=1;i<5;i++)if(a[0]<a[i])swap(a[0],a[i]);
	for(i=2;i<5;i++)if(a[1]<a[i])swap(a[1],a[i]);
	for(i=3;i<5;i++)if(a[2]<a[i])swap(a[2],a[i]);
	if(a[3]<a[4])swap(a[3],a[4]);
	for(i=0;i<5;i++)cout<<a[i]<<" ";
	cout<<endl;
	return 0;
}

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

using namespace std;

int num[5];

int main()
{
	
	while(!cin.eof())
	{
		for( int i=0;i<5;i++)
		{
			cin >> num[i];
		}

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

		for( int i=0;i<5;i++)
		{
			cout << num[i] <<endl;
		}
	}

	return 0;
}

C++: #include <iostream>
#include <algorithm>
#include <vector>
using namespace std;
 
int main(){
	int tem;
	vector<int> v1;
	for(int i=0;i<5;i++)
		cin >> tem,v1.push_back(tem);
	sort(v1.begin(),v1.end(),greater<int>());
	for(int i=0;i<5;i++)
		cout << v1[i] << ' ';
	cout << endl;
    return 0;
}

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

using namespace std;

int main() {
  int input[5];
  scanf(
      "%d %d %d %d %d",
      input, input + 1, input + 2, input + 3, input + 4);
  sort(input, input + 5, [](int a, int b) { return a > b; });
  printf(
      "%d %d %d %d %d\n",
      input[0], input[1], input[2], input[3], input[4]);

  return 0;
}

C++: #include<iostream>
#include<algorithm>
using namespace std;
int main(){
	long long a[5],i;
	for(i=0;i<5;i++)cin>>a[i];
	for(i=1;i<5;i++)if(a[0]<a[i])swap(a[0],a[i]);
	for(i=2;i<5;i++)if(a[1]<a[i])swap(a[1],a[i]);
	for(i=3;i<5;i++)if(a[2]<a[i])swap(a[2],a[i]);
	if(a[3]<a[4])swap(a[3],a[4]);
	for(i=0;i<5;i++)cout<<a[i]<<" ";
	return 0;
}