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++: #define _GLIBCXX_DEBUG
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define ALL(v) v.begin(), v.end()
typedef long long ll;

template<class T>bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; }
template<class T>bool chmin(T &a, const T &b) { if (b<a) { a=b; return 1; } return 0; }

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

int main(){
  int f[5];
  rep(i,5) cin>>f[i];
  sort(f,f+5);
  reverse(f,f+5);
  
  rep(i,5){
    if(i) cout<<" ";
    cout<<f[i];
  }
  cout<<endl;
    
  return 0;
}

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

int main()
{
	int a, b, c, d, e,sin=3,data;
	cin >> a >> b >> c >> d >> e;
	while (sin > 2) {
		sin = 1;
		if (a < b) {
			data = a;
			a = b;
			b = data;
			sin = 3;
		}
		if (b < c) {
			data = b;
			b = c;
			c = data;
			sin = 3;
		}
		if (c < d) {
			data = c;
			c = d;
			d = data;
			sin = 3;
		}
		if (d < e) {
			data = d;
			d = e;
			e = data;
			sin = 3;
		}	
	}
	cout << a << " " << b << " " << c << " " << d << " " << e;
}

C++: #include <iostream>
#include <cstdio>
#include <cstdlib>
#include <set>

using namespace std;

int main()
{
	set<int, greater<int> > n;
	set<int>::iterator ite;
	int a;

	for(int i=0; i<5; i++){
		cin >> a;
		n.insert(a);
	}
	for(ite=n.begin(); ite!=n.end(); ite++){
		cout << *ite << " ";
	}

	return 0;
}

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

int main(){
    int a[4];
    for(int i=0;i<5;i++){
        cin>>a[i];
    }
    sort(a,a+5);
    cout<<a[4]<<" "<<a[3]<<" "<<a[2]<<" "<<a[1]<<" "<<a[0]<<endl;
    return 0;
}

C++: #include <iostream>
#include <iomanip>
#include <vector>
#include <string>
#include <stack>
#include <queue>
#include <deque>
#include <set>
#include <map>
#include <algorithm>
#include <sstream>
#include <cstdlib>
#include <cstring>
#include <functional>
#include <numeric>
#include <cmath>
#include <climits>
#include <limits>
#include <cfloat>
#include <fstream>
using namespace std;

int main()
{
//	cut here before submit 
//	freopen("testcase.fn", "r", stdin);
	string str = "";

	getline (cin, str );
	stringstream ss(str);
	vector <int> num(5, 0);

	int i;
	for (i = 0; i < 5; ++i){
		ss >> num[i];
	} // end for

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

	for (i = 0; i < 5; ++i){
		cout << num[i];
		if (i != 4){
			cout << ' ';
		} // end if
	} // end for
	cout << endl;
		
	return 0;
}

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

int main()
{
	int x[5];
	for( int i = 0; i < 5; i++ ){
		std::cin >> x[i];
	}
	
	std::sort( x, x + 5 );

	std::cout << x[4];
	
	for( int i = 3; i >= 0; i-- ){
	 	std::cout << " " << x[i];
	}
	
	std::cout << std::endl;

 	return 0;
}

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

using namespace std;

int main() {
	int in;
	vector<int> s;
	while (cin >> in ) s.push_back(in);
	
	sort(s.begin(), s.end(), greater<int>());
	
	for (int i=0; i<(int)s.size(); i++) {
		cout << s[i];
		if (i<(int)s.size()-1) cout << " ";
	} 
	cout << endl;

	return 0;
}

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

int main()
{
	std::vector<int> v(5);

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

	std::sort(v.begin(),v.end());

	for(int i=4;i>0;--i)
	{
		std::cout << v[i] << ' ';
	}

	std::cout << v[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=n-1;i>-1;i--)
		printf("%d ",a[i]);
	printf("\b\n");
  return 0;
}

C++: #include<iostream>
using namespace std;
int main() {
	int a[11],date[11];
	for (int i = 1; i <= 5; i++) {
		cin >> a[i];
	}
	int dai = -999999;
	int o;
	for (int i = 1; i <= 5; i++) {
		int dai = -999999;
		for (int z = 1; z <= 5; z++) {
			if (dai <= a[z]) {
				dai = a[z];
				o = z;
			}
		}
		date[i] = dai;
		a[o] = -9999999;
	}
	for (int i = 1; i <= 4; i++) {
		cout << date[i]<<" ";
	}
	cout << date[5] << endl;
}

C++: #include<bits/stdc++.h>
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+b);
for(int i=0;i<5;i++){
if(i) cout<<" ";
cout<<a[i];
}
}

C++: #include<iostream>
#include<algorithm>
using namespace std;
int main(){
  int in[5];
  for(int i = 0; i < 5; i++)
    cin >> in[i];
  sort(in, in+5, greater<int>());
  for(int i = 0; i < 4; i++)
    cout << in[i] << " ";
  cout << in[4] << endl;
}

C++: #include<iostream>
#include<vector>
std::vector<int> qsort(std::vector<int> xs);


int main(){
	std::vector<int> vec(5);
	for(int i=0;i<5;i++){
		std::cin>>vec[i];
	}
	vec=qsort(vec);
	for(int i=4;i>-1;i--){
		std::cout<<vec[i];
		if(i!=0)std::cout<<" ";
		else std::cout<<std::endl;
	}
	
	
	return 0;
}

std::vector<int> qsort(std::vector<int> xs){

	if(xs.empty())return xs;
	else{
			int x=xs[0];
		std::vector<int> left;
		std::vector<int> right;
		for(int i=1;i<xs.size();i++){
			if(x>xs[i])left.push_back(xs[i]);
			else if(x<=xs[i])right.push_back(xs[i]);
		}
		left=qsort(left);
		right=qsort(right);
		left.push_back(x);
		left.insert(left.end(),right.begin(),right.end());
		return left;
	}
}

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

int main(){

int a,b,c,d,e;
cin >> a >> b >> c >> d >> e;
int r = 0;
if(a < b){
r = a;
a = b;
b = r;
}
if(a < c){
r = a;
a = c;
c = r;
}
if(a < d){
r = a;
a = d;
d = r;
}
if(a < e){
r = a;
a = e;
e = r;
}

if(b < c){
r = b;
b = c;
c = r;
}
if(b < d){
r = b;
b = d;
d = r;
}
if(b < e){
r = b;
b = e;
e = r;
}
if(c < d){
r = c;
c = d;
d = r;
}
if(c < e){
r = c;
c = e;
e = r;
}
if(d < e){
r = d;
d = e;
e = r;
} 
cout << a << b << c << d << e << endl;
    return 0;
}

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

#define FOR(var, start, end)    for(var = start; var < end; ++var)
#define WHILE(var, end)  while(var != end)
#define SHOW_ALL(a, b, c)    cout << a << endl; \
                                cout << b << endl; \
                                cout << c << endl;

using namespace std;


void BubbleSort(vector <int> &num)
{
      int i, j, flag = 1;    // set flag to 1 to start first pass
      int temp;             // holding variable
      int numLength = num.size( ); 
      for(i = 1; (i <= numLength) && flag; i++)
     {
          flag = 0;
          for (j=0; j < (numLength -1); j++)
         {
               if (num[j+1] > num[j])      // ascending order simply changes to <
              { 
                    temp = num[j];             // swap elements
                    num[j] = num[j+1];
                    num[j+1] = temp;
                    flag = 1;               // indicates that a swap occurred.
               }
          }
     }
     return;   //arrays are passed to functions by address; nothing is returned
}

int main()
{
    int input;
    vector<int> input_array;
    while(cin >> input){
        input_array.push_back(input);
    }
    BubbleSort(input_array);
    for(auto num:input_array){
        cout << num << " ";
    }
    
}

C++: #include <iostream>
#include <vector>
#include <algorithm>
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++){
    cout << n[i];
    if(i==4) break;
    cout << ' ';
  }
  cout << endl;
  return 0;
}