Go: package main

import (
        "fmt"
        "sort"
)


func main() {
        var s []int
        var n int
        for i := 0; i < 5; i++ {
                fmt.Scanf("%d", &n)
                s = append(s, n)
        }
        sort.Ints(s)
        for i:= 1; i <= len(s); i++ {
                fmt.Printf("%d", s[len(s)-i])
                if i < len(s) {
                        fmt.Printf(" ")
                }
        }
        fmt.Printf("\n")
}

C++: #include<bits/stdc++.h>
using namespace std;

typedef long long int ll;
typedef pair<int, int> pii;
typedef vector<int> vi;
typedef vector<pair<int, int> > vii;
#define rrep(i, m, n) for(int (i)=(m); (i)<(n);  (i)++)
#define  rep(i, n)    for(int (i)=0; (i)<(n);  (i)++)
#define  rev(i, n)    for(int (i)=(n)-1; (i)>=0; (i)--)
#define vrep(i, c)    for(__typeof((c).begin())i=(c).begin(); i!=(c).end(); i++)
#define  ALL(v)       (v).begin(), (v).end()
#define mp            make_pair
#define pb            push_back
template<class T1, class T2> inline void minup(T1& m, T2 x){ if(m>x) m=static_cast<T2>(x); }
template<class T1, class T2> inline void maxup(T1& m, T2 x){ if(m<x) m=static_cast<T2>(x); }

#define INF 1000000000
#define MOD 1000000009
#define EPS 1E-9

int a[5];

int main()
{
  rep(i, 5) cin >> a[i];

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

  rep(i, 5) cout << a[i] << (i==4 ? "\n" : " ");

  return 0;
}

C++: #include<iostream>
#include<string>
#include<cstdio>
#include<cstring>
#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;i>0;i--)cout<<a[i]<<" ";
    cout<<a[0]<<endl;
	return 0;
}

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

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

C++: #include<iostream>
#include<algorithm>
using namespace std;
int main(){
  int num[5];
  cin >>num[0]>>num[1]>>num[2]>>num[3]>>num[4];
  sort(num,num+5);
  cout <<num[4]<<" "<<num[3]<<" "<<num[2]<<" "<<num[1]<<" "<<num[0]<<endl;
  return 0;
}

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

#define FOR(var, start, end)    for(var = start; var < end; ++var)
#define WHILE(var, end)  while(var != end)
#define SHOW_ALL(a, b, c)    cout << a << endl; \
                                cout << b << endl; \
                                cout << c << endl;

using namespace std;


void BubbleSort(vector <int> &num)
{
      int i, j, flag = 1;    // set flag to 1 to start first pass
      int temp;             // holding variable
      int numLength = num.size( ); 
      for(i = 1; (i <= numLength) && flag; i++)
     {
          flag = 0;
          for (j=0; j < (numLength -1); j++)
         {
               if (num[j+1] > num[j])      // ascending order simply changes to <
              { 
                    temp = num[j];             // swap elements
                    num[j] = num[j+1];
                    num[j+1] = temp;
                    flag = 1;               // indicates that a swap occurred.
               }
          }
     }
     return;   //arrays are passed to functions by address; nothing is returned
}

int main()
{
    int input;
    vector<int> input_array;
    while(cin >> input){
        input_array.push_back(input);
    }
    BubbleSort(input_array);
    printf("%d %d %d %d %d\n", input_array[0],input_array[1],input_array[2],input_array[3],input_array[4]);

    
}

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 <stdio.h>
int main(){
	int a[5];
	for(int i=0;i<5;i++)	scanf("%d",&a[i]);
	for(int i=0;i<5;i++){
		for(int j=i+1;j<5;j++){
			if(a[i]<a[j]){
				a[i]^=a[j];
				a[j]^=a[i];
				a[i]^=a[j];
			}
		}
	}
	for(int i=0;i<5;i++){
		if(i)	printf(" ");
		printf("%d",a[i]);
	}
	printf("\n");
	return 0;
}

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

using namespace std;

int main(){
	vector<int> vec(5, 0);
	int i;
	
	for(i = 0; i < vec.size(); i++)
		cin >> vec[i];
	sort(vec.begin(), vec.end());
	
	for(i = vec.size() - 1; i >= 0; i--){
		cout << vec[i];
		if(i != 0)
			cout << " ";
		else cout << endl;
	}
	
	return 0;
}

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

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

	for(int i=0 ; i<5 ; i++){
		cin >> n;
		a.push_back(n);
	}
	sort( a.begin(), a.end(), greater<int>());
	for(int i=0 ; i<=4 ; i++){
		cout << a[i] << " " << endl;
	}
	return 0;
}

C++: #include <iostream>
#include <vector>
#include <set>
#include <queue>
#include <stack>
#include <string>
#include <sstream>
#include <list>
#include <functional>
#include <algorithm>

using namespace std;

int main(int, char**){
    int a,b,c,d,e;
    cin >> a>>b>>c>>d>>e;
    vector<int> v = {a,b,c,d,e};
    std::sort(v.begin(),v.end(),greater<int>());
    //for(auto e: v) cout << e << ' ';
    cout << v[0] << ' ' << v[1] << ' ' << v[2] << ' ' << v[3] << ' ' << v[4] << endl;
    return 0;
}

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