Go: package main

import (
	"fmt"
	"sort"
)

func main() {
	var a, b, c, d, e int
	fmt.Scan(&a, &b, &c, &d, &e)
	dataset := []int{a, b, c, d, e}

	sort.Sort(sort.Reverse(sort.IntSlice(dataset)))
	fmt.Printf("%d %d %d %d %d\n", dataset[0], dataset[1], dataset[2], dataset[3], dataset[4])
}

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

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