Go: package main

import (
	"fmt"
	"sort"
)

func main() {
	var a, b, c, d, e int
	fmt.Scan(&a, &b, &c, &d, &e)
	dataset := []int{a, b, c, d, e}

	sort.Sort(sort.Reverse(sort.IntSlice(dataset)))
	fmt.Printf("%d %d %d %d %d\n", dataset[0], dataset[1], dataset[2], dataset[3], dataset[4])
}

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

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