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

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

int main(){
	int num[5];
	int m1 = -2147483647, m2 = -2147483647, m3 = -2147483647, m4 = -2147483647, m5 = -2147483647;
        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 <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]) {
				int tmp = arr[i];
				arr[i] = arr[j];
				arr[j] = tmp;
			}
			

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

	std::cout << std::endl;
}

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

using namespace std;

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