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 <iostream>
#include <stdio.h>
#include <string>
#include <string.h>
#include <queue>
#include <cmath>
#include <stack>

#define int64 long long int

using namespace std;

int main()
{
	int i, n;
	priority_queue<int> qu;

	for(i=0; i<5; i++) {
		cin >> n;
		qu.push(n);
	}
	for(i=0; i<5; i++) {
		cout << qu.top();
		qu.pop();
		if(i != 4) cout << ' ';
		else cout << '\n';
	}
	return 0;
}

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

#define INPUT_FROM_FILE (0) 
#if INPUT_FROM_FILE
#include <fstream>
#endif

int main(int argc, char **argv){
	std::vector<int> v(5);

#if INPUT_FROM_FILE
	std::ifstream ifs("test.txt");
#endif

#if INPUT_FROM_FILE
	ifs >> v[0] >> v[1] >> v[2] >> v[3] >> v[4];
#else
	std::cin >> v[0] >> v[1] >> v[2] >> v[3] >> v[4];
#endif

	std::sort(v.begin(), v.end(), std::greater<int>());
	
	std::cout << v[0];
	for(int i = 1; i < 5; i++){
		std::cout << " " << v[i];
	}
	std::cout << std::endl;
	return 0;
}

C++: #include <iostream>

using namespace std;

int main(){
	int a[5],i,j,b;
	scanf("%d %d %d %d %d",&a[0],&a[1],&a[2],&a[3],&a[4]);
	for(i=0;i<5;i++){
		for(j=0;j<4;j++){
			if(a[j]<=a[j+1]){
				b=a[j];
				a[j]=a[j+1];
				a[j+1]=b;
			}
		}
	}
	for(i=0;i<5;i++){
		printf("%d",a[i]);
		if(i<4){
			printf(" ");
		}else{
			printf("\n");
		}
	}
	return 0;
}

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

int main(){
int a[5];
int biggest[5];
cin>>a[0]>>a[1]>>a[2]>>a[3]>>a[4];
biggest[0]=a[0];
for(int i=1;i<5;i++){
for(int j=0;j<i;j++){
if(a[i]>biggest[j]){
for(int k=i;k>j;k--){
biggest[k]=biggest[k-1];}
biggest[j]=a[i];
break;}}}
for(int i=0;i<5;i++){
if(i!=4){
cout<<biggest[i]<<" ";}
if(i=4){
cout<<biggest[i];}
}}

C++: #include<cstdio>
#include<cstdlib>
#include<cstring>
#include<cmath>
#include<ctime>
#include<cctype>
#include<climits>
#include<iostream>
#include<string>
#include<vector>
#include<map>
#include<list>
#include<queue>
#include<deque>
#include<algorithm>
#include<numeric>
#include<utility>
#include<complex>
#include<memory>
#include<functional>

#define REP(i, n) for(int i = 0;i < n;i++)
#define REPR(i, n) for(int i = n;i >= 0;i--)
#define FOR(i, m, n) for(int i = m;i < n;i++)
#define FORR(i, m, n) for(int i = m;i >= n;i--)
#define SORT(v, n) sort(v, v+n);
#define VSORT(v) sort(v.begin(), v.end());
#define llong long long
#define pb(a) push_back(a)
#define INF 999999999
using namespace std;

typedef vector<int> vi;
typedef vector<long long> vl;
typedef vector<double> vd;
typedef pair<int, int> pii;
typedef pair<long, long> pll;
typedef long long ll;

int dy[] = { 0, 0, 1, -1, 0 };
int dx[] = { 1, -1, 0, 0, 0 };

int main(){
	ios::sync_with_stdio(false);

	vi a(5, 0);

	REP(i, 5)	scanf("%d", &a[i]);

	VSORT(a);

	REPR(i, 4)	printf("%d ", a[i]);

	
}

C++: #include <iostream>
#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];
    if( i != 0 )cout << " ";
  }
  cout << endl;
  return 0;
}

C++: # include <iostream>
# include <algorithm>
# include <vector>
# include <string>
# include <set>
# include <cmath>
# include <iomanip>
# include <functional>

using namespace std;

int main() {
	int a;
	vector<int> v;
	for (int i = 0; i < 5; i++) {
		cin >> a;
		v.emplace_back(a);
	}
	sort(v.begin(), v.end(), std::greater<int>());
	for (int i = 0; i < 5; i++) {
		cout << v[i];
		if (i != 4) {
			cout << " ";
		}
		else {
			cout << endl;
		}
	}
}

C++: #include <iostream>

int main(){
	
	int a[5];
	int s[5];
	for(int r=0;r<5;r++){
		s[r]=0;
	}
	for(int b=0;b<5;b++){
		std::cin>>a[b];
		if(a[b]>s[0]){
			s[4]=s[3];
			s[3]=s[2];
			s[2]=s[1];
			s[1]=s[0];
			s[0]=a[b];
		}else if(a[b]>s[1]){
			s[4]=s[3];
			s[3]=s[2];
			s[2]=s[1];
			s[1]=a[b];
		}else if(a[b]>s[2]){
			s[4]=s[3];
			s[3]=s[2];
			s[2]=a[b];
		}else if(a[b]>s[3]){
			s[4]=s[3];
			s[3]=a[b];
		}else{
			s[4]=a[b];
		}
	}
	for(int q=0;q<5;q++){
		std::cout<<s[q]<<" ";
	}
	return 0;
}

C++: #include<cstdio>
#include<algorithm>

using namespace std;

int main(){
  int a[5],i,j,min,min_n;

  for(i=0;i<5;i++)
    scanf("%d",&a[i]);

  for(i=0;i<5;i++){
    min=a[i]; min_n=i;
    for(j=i+1;j<5;j++){
      if(min>a[j]){
        min=a[j]; min_n=j;
      }
    }
  swap(a[i],a[min]);
  printf( i<4 ? "%d " : "%d\n",a[i]);
  }
  return 0;
}

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

using namespace std;

int main(void){
	int n,i;
	vector<int> intv;

	while(cin >> n){
		intv.push_back(n);
		if(intv.size() == 5) break;
	}

	//cout << "input ended" << endl;

	sort(intv.begin(), intv.end());
	
	/*
	for(i=intv.size();i>1;i--){
		cout << intv[i-1] << " ";
	}

	cout << intv[0] << endl;
	*/
	
	vector<int>::iterator it = intv.end() - 1;
	while(it != intv.begin()){
		cout << *it << " ";
		--it;
	}

	cout << *it << endl;

	return 0;
}

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

int main(){
int a;
int b[5];
int c;
int d;
int e;
c=0;
while(c<5){
b[c]=0;
c=c+1;
}
c=0;
while(c<5){
cin >>a;
d=0;
while(1){if(a>=b[d]){e=3; if(e>=d){while(e>=d){b[e+1]=b[e]; e=e-1;}} b[d]=a; break;} d=d+1;     }
c=c+1;
}
c=0;
while(c<5){
cout << b[c];
if(c<4){cout <<" ";}
c=c+1;}
cout << endl;

}

C++: #include<stdio.h>

int main(void)
{
	int a,b,c,d,e,x[5],t=0;
	scanf("%d %d %d %d %d",&a,&b,&c,&d,&e);

	for(t;t<5;t++)
	if(a>=b&&a>=c&&a>=d&&a>=e)
	{
		x[t]=a;
		a=0;
	}
	else if(b>=c&&b>=d&&b>=e)
	{
		x[t]=b;
		b=0;
	}
	else if(c>=d&&c>=e)
	{
		x[t]=c;
		c=0;
	}
	else if(d>=e)
	{
		x[t]=d;
		d=0;
	}
	else
	{
		x[t]=e;
		e=0;
	}

	printf("%d %d %d %d %d",x[0],x[1],x[2],x[3],x[4]);
	return 0;
}

C++: #include<iostream>
#include<vector>
#include<algorithm>
using namespace std;
int main(){
  vector<int> num;
  int n;
  for(int i=0; i<5; i++){
    cin >> n;
    num.push_back(n);
  }

  sort(num.begin(), num.end(), greater<int>());

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

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

using namespace std;

int comp(int *a,int *b){
    int buffer;
    if(*a > *b){
        buffer = *b;
        *b = *a;
        *a = buffer;
        return 1;
    }
    else{
        return 0;
    }
}

int main(){
    int a,b,c,d,e;
    int i = 1;
    cin >> a >> b >> c >> d >> e;
    while(i){
        i = 0;
        i += comp(&a,&b);
        i += comp(&b,&c);
        i += comp(&c,&d);
        i += comp(&d,&e);
    }
    cout << e << " " << d << " " << c << " " << b << " " << a << endl;
    return 0;
}

C++: #include<cstdio>
#include<iostream>
int a[5];
int swa;
int change(int n){
    swa=a[n],a[n]=a[n-1],a[n-1]=swa;
}
int main(){
    for(int i=0;i<5;i++)
        scanf("%d",&a[i]);
    for(int i=4;i>=0;i--){
        for(int j=4;j>0;j--){
            if(a[j-1]>a[j])
                change(j);
        }
    }
    for(int i=0;i<4;i++)
        printf("%d ",a[i]);
        printf("%d\n",a[4]);
    return 0;
}

C++: #include <bits/stdc++.h>
#define r(i,n) for(int i;i<n;i++)
using namespace std;
int main(){
  int a[5];
  r(i,5)cin>>a[i];
  sort(a,a+4);
  for(int i=4;i>=0;i--){
    cout<<a[i];
    if(!i)break;
    cout<<' ';
  }
  cout<<endl;
}