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 <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);
    for(auto num:input_array){
        cout << num << " ";
    }
    
}

C++: #include<iostream>
#include<algorithm>
using namespace std;
int main(){

  int a[5],n=5;
  while(n--) cin >> a[n];
  sort(a,a+5);
  for(int i = 4;i >= 0;i--){
    if(i != 0) cout << a[i] << ' ';
    else cout << a[i] << endl;
  }
  return (0);
}

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



int main(void)
{
  int e,f=0;
  int i=0,j,k,l;
  double Max,Min,ans;
  vector<int> array;
  int aiTable[5];

cin>>aiTable[0]>>aiTable[1]>>aiTable[2]>>aiTable[3]>>aiTable[4];
    
 sort(aiTable, aiTable + 5);

for(i=5;i>0;)
    {
		i--;
	cout<<aiTable[i]<<" ";
    }
cout<<endl;
}

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

int main() {
	int a,b,c,d,e;
	cin>>a>>b>>c>>d>>e;
	int num[]={a,b,c,d,e};
	for(int i=0;i<5;i++)
		for(int j=i+1;j<5;j++)
			if(num[i]<num[j])
				swap(num[i],num[j]);
	for(int i=0;i<5;i++){
		cout<<num[i]<<" ";
	}
}

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);
	reverse(a,a+5);
	cout<<a[0];
	for(int j=1;j<5;j++){
		cout<<" "<<a[j];
	    }
	cout<<endl;
	return 0;
	}

C++: //Vol0 0018
#include<stdio.h>
int main()
{
	int x[5],b=0;
	for(int i=0;i<5;i++){
		scanf("%d",&x[i]);
	}
	for(int i=5;i!=0;i--){
		for(int j=1;j<i;j++){
			if(x[j-1]<x[j]){
				b=x[j];
				x[j]=x[j-1];
				x[j-1]=b;
			}
		}
	}
	for(int i=0;i<5;i++){
		printf("%d",x[i]);
		if(i==4){
			printf("\n");
		}else{
			printf(" ");
		}
	}
	return 0;
}

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

int main(){
	int a[5],i;
	for(i=0;i<5;i++){
		cin >> a[i];
	}
  sort(a,a+5,greater<int>()); 
	for(i=0;i<5;i++){
		cout << a[i];
		if(i<4)cout << ' ';
		else cout << endl;
	}
  return 0;
}

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

int main(){
	int num[5];
	int m1 = 0, m2 = 0, m3 = 0, m4 = 0, m5 = 0;
        int p1 = 0, p2 = 0, p3 = 0, p4 = 0;
	cin >> num[0] >> num[1] >> num[2] >> num[3] >> num[4];

	for(int i=0; i<5; i++){
		if(m1 < num[i]){
                      m1 = num[i];
                      p1 = i;
                }
	}

	for(int i=0; i<5; i++){
   		if(i == p1) continue;
		else if(m2 < num[i]){
			m2 = num[i];
			p2 = i;
		}	
	}
	for(int i=0; i<5; i++){
   		if(i == p2 || i == p1) continue;
		else if(m3 < num[i]){
			m3 = num[i];
			p3 = i;
		}
	}
	for(int i=0; i<5; i++){
   		if(i == p3 || i == p1 || i == p2) continue;
		else if(m4 < num[i]){
			m4 = num[i];
			p4 = i;
		}	
	}
	for(int i=0; i<5; i++){
   		if(i == p4 || i == p1 || i == p2 || i == p3) continue;
		else if(m5 < num[i]){
			m5 = num[i];
		}	
	}
	cout << m1 << " " << m2 << " " << m3 << " " << m4 << " " << m5 << endl;

	return 0;

}

C++: #include<algorithm>
#include<functional>
#include<cmath>
#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<string>
#include<sstream>
#include<iostream>
#include<iomanip>
#include<vector>
#include<list>
#include<stack>
#include<queue>
#include<map>
#include<set>
#include<bitset>

#define all(c) (c).begin(), (c).end()
#define rep(i,n) for(int i=0;i<(n);i++)
#define pb(e) push_back(e)
#define mp(a, b) make_pair(a, b)
#define fr first
#define sc second

typedef unsigned long long ull;
typedef long long ll;

const int INF=100000000;
int dx[4]={1,0,-1,0};
int dy[4]={0,1,0,-1};

using namespace std;

typedef pair<int ,int > P;


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

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

	rep(i,5) cout<<a[i]<<" ";


	return 0;
}

C++: /*****include*****/
#include <iostream>
#include <fstream>

/*****デバッグ定義*****/
//#define DEBUG
/*****マクロ定義*****/

/*****名前空間*****/
using namespace std;

/*****グローバル変数置き場*****/
int number[5];

/*****その他関数置き場*****/
void Q_sort(int left,int right){
	int threshold = (number[left] + number[right])/2;
	int i;
	int j;
	i = left;
	j = right;
	do{
		while(number[i] < threshold)	i++;
		while(number[j] > threshold)	j--;
		if(i <= j){
			int swap = number[i];
			number[i] = number[j];
			number[j] = swap;
			i++;
			j--;
		}
	}while(i <= j);
	if(j > left)	Q_sort(left,j);
	if(i < right)	Q_sort(i,right);
}
/*****main関数*****/
int main(){
	/*****ファイルオープン*****/
#ifdef DEBUG
	ofstream fout("output.txt");
	ifstream fin("input.txt");
	if(!fout || !fin){
		cout << "Can't open the file.\n";
		return;
	}
#endif
	/*****変数置き場*****/
	for(int i=0;i<5;i++)	cin >> number[i];
	Q_sort(0,4);
	for(int i=0;i<5;i++)	cout << number[4-i] << " ";
	cout << endl;
	/*****処理部*****/

	/*****処理終了後*****/
#ifdef DEBUG
	fout.close();
	fin.close();
#endif
	return 0;
}

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

int main(){
  int nari[5],i,j,h,a;

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

  for(i=0;i<5;i++){
    a=i;
    for(j=i;j<5;j++){
      if(nari[a]<nari[j])a=j;
    }
    h=nari[a];
    nari[a]=nari[i];
    nari[i]=h;
  }

  for(i=0;i<5;i++){
    cout << nari[i];
    if(i != 4)printf(" ");
  }
  cout << endl;
}

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 <array>
#include <algorithm>
#include <iterator>
#include <cstdint>

int main()
{
	std::array<std::uint32_t, 5> numbers;
	for (std::uint32_t& num : numbers) {
		std::cin >> num;
	}
	std::sort(numbers.begin(), numbers.end(),
			std::greater<std::uint32_t>());
	std::copy(numbers.begin(), numbers.end() - 1,
			std::ostream_iterator<std::uint32_t>(std::cout, " "));
	std::cout << numbers.back() << std::endl;
	return 0;
}