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

C++: #include <cstdio>
#include <cstring>
#include <algorithm>
#include <string>
#include <cmath>
#include <stack>
#include <vector>


using namespace std;

int main()
{
	int hoge[5];
	for (int i = 0; i < 5; ++i)
		scanf("%d", hoge+i);
	sort(hoge, hoge+5, greater<int>());
	for (int i = 0; i < 5; ++i)
		printf("%d ", hoge[i]);
	printf("\n");

	return 0;
}

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 << std::endl;
	return 0;
}

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

using namespace std;

int main(){

	vector<int> v;

	for(int i=0;i<5;i++){
		int a;
		cin>>a;
		v.push_back(a);
	}

	sort(v.rbegin(),v.rend());

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

	return 0;
}