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

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]);
	a=num[0];
	b=num[1];
	c=num[2];
	d=num[3];
	e=num[4];
	cout<<a<<" "<<b<<" "<<c<<" "<<d<<" "<<e<<endl;<<" "<<
}

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

int main()
{
	std::array<int,5> v;
	std::cin >> v[0] >> v[1] >> v[2] >> v[3] >> v[4];
	std::sort( v.begin(), v.end(), std::greater<int>() );
	std::cout << v[0] << ' ' << v[1] << ' ' << v[2] << ' ' << v[3] << ' ' << v[4] << '\n';
}

C++: *a=&a;main(i){*a=~scanf("%d",++a)?!printf(i?"%d\n":"%d ",*--a,main(0)):qsort(a-5,5,4,"YXZRPQ?+\2\303");}

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

int main(){
int a,b,c,d,e;
int A,B,C,D,E;
cin>>a>>b>>c>>d>>e;
if(a>b){
A=a;
B=b;}
else{
A=b;
B=a;}
if(c<B){
C=c;}
else{
C=B;
if(c<A){
B=c;}
else{
B=A;
A=c;}}
if(d<C){
D=d;}
else{
D=C;
if(d<B){
C=d;}
else{
C=B;
if(d<A){
B=d;}
else{
B=A;
A=d;}}}
if(e<D){
	E=e;}
else{
E=D;
if(e<C){
D=e;}
else{
D=C;
if(e<B){
C=e;}
else{
C=B;
if(e<A){
B=e;}
else{
B=A;
A=e;}}}}
cout<<A<<" "<<B<<" "<<C<<" "<<D<<" "<<E<<endl;
}

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

int main() {
	int num[5];
	scanf("%d %d %d %d %d",&num[0],&num[1],&num[2],&num[3],&num[4]);
	sort(num,num+5);
	printf("%d %d %d %d %d",num[4],num[3],num[2],num[1],num[0]);
}

C++: /* All men have limits. They learn what they are and learn
   not to exceed them, I ignore mine. -Batman           */

#include <bits/stdc++.h>
//#include <Windows.h>
using namespace std;

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

C++: #define _USE_MATH_DEFINES

#include <iostream>
#include <algorithm>
#include <string>
#include <vector>
#include <math.h>

using namespace std;

int main(){
	int a[5];
	for(int i=0;i<5;i++){
		cin >> a[i];
	}
	sort(a,a+5);
	for(int i=0;i<4;i++){
		cout << a[i] << " ";
	}
	cout << a[4] << 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 i=0;
  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>
#include<algorithm>
using namespace std;
int main() {
  int v[5];
  for(int i = 0; i < 5; i++) cin >> v[i];
  sort( v, v + 5 );
  reverse(v, v + 5);
  cout << v[0];
  for(int i = 1; i < 5; i++) cout << " " << v[i];
  cout << endl;
}

C++: #include<bits/stdc++.h>
using namespace std;
#define all(vec) vec.begin(),vec.end()
typedef long long int ll;
typedef pair<int,int> P;
typedef pair<P,P> PP;
const ll MOD=10000;
const ll INF=1000000010;
const int MAX=100001;
int dx[4]={0,1,0,-1};
int dy[4]={1,0,-1,0};
int main(){
    int a[5];for(int i=0;i<5;i++){cin>>a[i];}sort(a,a+5,greater<int>());for(int i=0;i<5;i++){cout<<a[i];cout<<(i!=4?" ":"\n");}
    return 0;
}