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

	return 0;
}

C++: #include <bits/stdc++.h>
using namespace std;
bool func(int a,int b)
{
    return (a>b);
}
int main()
{
    int ara[100000],i;
    for (i=0;i<5;i++)
    {
        scanf ("%d",&ara[i]);
    }
    sort(ara,ara+5,func);
    for (i=0;i<5;i++)
    {
        printf ("%d",ara[i]);
        if (i<4)
            cout<<" ";
    }
    cout<<endl;
}

C++: #include <stdio.h>

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

C++: #include<iostream>
#include<vector>
using namespace std;
int main() {
	int a,i,j,change;
	for(int k=0;k<5;k++){
            cin>>a;
            s.push_back(a);
        }
	for (i = 0; i < 4; i++) {
		for (j = 0; j < 4-i; j++) {
			if (s[j] < s[j + 1]) {
				change = s[j];
				s[j] = s[j+1];
				s[j+1] = change;
			}
		}
    }
	cout << s[0] << " " << s[1] << " " << s[2] << " " << s[3] << " " << s[4];
	return 0;
}

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

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

C++: #include <iostream>
using namespace std;
void swap(int *x, int *y)
{
	int tmp = *x;
	*x = *y;
	*y = tmp;
}

void sort(int date[], int n)
{
	int k = n-1;
	while(k>=0){
		int i,j;
		for (i=1, j=-1; i <=k; i++)
			if(date[i-1] < date[i]) {
				j = i-1;
				swap(&date[i], &date[j]);
			}
		k = j;
	}
}

int main(void)
{
	int n[5];
	while(cin >> n[0]){
		for(int i = 1; i < 5; i++){
			cin >> n[i];
		}
		sort(n, 5);
		for(int i=0; i<5; i++){
			cout << n[i];
			if(i!=4) cout << " "; 
		}
		cout << endl;
	}
	return(0);
}

C++: #include<cstdio>

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

C++: #include <iostream>
#include <algorithm>
#include <cstdio>
#include <deque>
#include <functional>

using namespace std;

int main(void)
{
	int a,b,c,d,e;
	while(cin>>a>>b>>c>>d>>e)
	{
		deque<int> nums;
		nums.push_back(a);
		nums.push_back(b);
		nums.push_back(c);
		nums.push_back(d);
		nums.push_back(e);
		sort( nums.begin(), nums.end(), greater<int>() );
		deque<int>::iterator it = nums.begin();
		while( it != nums.end() )
		{
			cout<<*it<<" ";
			++it;
		}
		cout<<endl;
	}
	return 0;
}

C++: #define _USE_MATH_DEFINES
#include <iostream>
#include <queue>
#include <vector>
#include <math.h>
#include <algorithm>
#include <iomanip>
#include <string>
#include <stack>
using namespace std;

int main(){
	priority_queue<int> q;
	for (int i = 0; i < 5; ++i) {
		int a;
		cin >> a;
		q.push(a);
	}
	for (int i = 0; i < 5; ++i) {
		cout << q.top() << ' ';
		q.pop();
	}
	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 <iostream>
#include <algorithm>
#include <vector>
#include <iterator>
#include <functional>

#define REP(i,n) for(int i = 0; i < (n); ++i)
using namespace std;

int main(){
	vector<int> ret;
	int a;
	while(cin>>a) ret.push_back(a);
	sort(ret.begin(), ret.end() ,greater<int>());
	REP(i, ret.size()) {
		cout<<ret[i];
		if (i != ret.size() -1)
		{
			cout << " ";
		}
	}
	return 0;
}

C++: #include <iostream>
#include <algorithm>
#include <complex>
#include <cassert>
#include <vector>
#include <iomanip>

using namespace std;

typedef complex<double> P;

#define all(c) (c).begin(), (c).end()
#define loop(i,a,b) for(int i=(a); i<(int)(b); i++)
#define rep(i,b) loop(i,0,b)

const double eps = 1e-10;

double cross(const P& a, const P& b) {
    return imag(conj(a)*b);
}
double dot(const P& a, const P& b) {
    return real(conj(a)*b);
}

struct L : public vector<P> {
    L(const P &a, const P &b) {
        push_back(a); push_back(b);
    }
};

P crosspoint(const L &l, const L &m) {
    double A = cross(l[1] - l[0], m[1] - m[0]);
    double B = cross(l[1] - l[0], l[1] - m[0]);
    if (abs(A) < eps && abs(B) < eps) return m[0]; // same line
    if (abs(A) < eps) assert(false); // !!!PRECONDITION NOT SATISFIED!!!
    return m[0] + B / A * (m[1] - m[0]);
}

typedef vector<int> vi;
int main(){
    vi a(5);
    rep(i, 5) cin >> a[i];
    sort(all(a));
    cout << a[4];
    rep(i, 4){
        cout << " " << a[3 - i];
    }
}

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

int main(void){


    vector<int> array(5,0);

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

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

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

    return 0;
}

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

using namespace std;

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

C++: #include<bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i = 0; i < n; i++)

int a[5];

int main(){
	rep(i,5) cin >> a[i];
	sort(a, a+5, greater<int>());
	rep(i,5){
		cout << a[i];
		if(i == 4) break;
		cout << " ";
	}
	cout << endl;
}

C++: #include <stdio.h>

int main(){
	int num[5];
	int i,j;
	int key;
	int mini = 0;
	
	scanf("%d %d %d %d %d",&num[0],&num[1],&num[2],&num[3],&num[4]);

	for(i = 0;i < 5 ;i++){
		key = num[i];
		mini = i;
		for(j = i;j < 5;j++){
			if(key > num[j]){
				key = num[j];
				mini = j;
			}
		}
		num[mini] = num[i];
		num[i] = key;
	}
	
	for(i = 0;i < 5;i++){
		if(i < 4){
			printf("%d ",num[4-i]);
		}else{
			printf("%d\n",num[0]);
		}
	}
	
	return 0;
}

C++: #include<iostream>
#include<iomanip>
#include<algorithm>
#include<cctype>
#include<cmath>
#include<cstdio>
#include<set>
#include<stack>
#include<string>
#include<sstream>
#include<map>
#include<queue>
#include<vector>

using namespace std;

int main() {
	long long int a,b,c,d,e;
	int s[5];
	cin >> a>>b>>c>>d>>e;
	s[0]=a;
	s[1]=b;
	s[2]=c;
	s[3]=d;
	s[4]=e;
	for(int i=4;i>0;i--)
		cout << s[i] << " ";
	cout << s[0] <<endl;
	
	return 0;
}

C++: #include<stdio.h>
#define n 5

int main(void)
{
	int a[n],i,j,t;

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

	for( i = 1; i < n; ++i )
	{
		t = a[i];
		for( j = i; j > 0 && a[j-1] > t; --j )
		{
			a[j] = a[j-1];
		}
		a[j] = t;
	}
	for(i=0;i<n;i++)
		printf("%d ",a[i]);
	printf("\n");
  return 0;
}