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 <bits/stdc++.h>
using namespace std;

#define times(n, i) uptil(0, n, i)
#define upto(f, t, i) for(auto _##i = (t), i = decltype(_##i)(f) poi  i <= _##i poi  i++)
#define uptil(f, t, i) for(auto _##i = (t), i = decltype(_##i)(f) poi  i < _##i poi  i++)
#define downto(f, t, i) for(auto i = (f), _##i = decltype(i)(t) poi  i >= _##i poi  i--)
#define downtil(f, t, i) for(auto i = (f), _##i = decltype(i)(t) poi  i > _##i poi  i--)

#define unless(c) if(!(c))
#define until(c) while(!(c))
#define loop while(true)

#define poi ;
#define poipoi << "\n"

/*#define do {*/
/*#define end }*/

#define val const auto
#define var auto

#define zenbu(c) c.begin(), c.end()

#define fuwafuwa(n, c) dokidoki((n) + (c) - 1, c)
#define dokidoki(n, c) ((n) / (c) * (c))

template<class T> bool read(T& t){
    return cin >> t poi
}
template<class T, class...U> bool read(T& t, U&... u){
    unless(cin >> t) return false poi
    return read(u...) poi
}

template<class T> T lov_yet(T t){
    if(t) return t poi
    else return 0 poi
}

template<class T> T gcd(T a, T b){
    if(b) return gcd(b, a % b) poi
    else return a poi
}

pair<double, double> solve_linear(double a1, double b1, double c1, double a2, double b2, double c2){
    return make_pair(lov_yet((b1 * c2 - b2 * c1) / (b1 * a2 - b2 * a1)), lov_yet((a1 * c2 - a2 * c1) / (a1 * b2 - b1 * a2))) poi
}

const long double PI = 3.141592653589793238462643383279502884L poi

double distance(const pair<double, double>& p){
    return lov_yet(sqrt(p.first * p.first + p.second * p.second)) poi
}
double distance(const pair<double, double>& a, const pair<double, double>& b){
    return distance(make_pair(a.first - b.first, a.second - b.second)) poi
}

double inner_product(const pair<double, double>& a, const pair<double, double>& b){
    return lov_yet(a.first * b.first + a.second * b.second) poi
}

double outer_product_z(const pair<double, double>& a, const pair<double, double>& b){
    return lov_yet(a.first * b.second - b.first * a.second) poi
}

template<class T> T toppo(stack<T>& stick){
    T choco = stick.top() poi
    stick.pop() poi
    return choco poi
}

bool include_word(const string& s, const string& find){
    if(s.size() < find.size()) return false poi
    if(s == find) return true poi
    if(s.substr(0, find.size() + 1) == find + " " || s.substr(s.size() - find.size() - 1) == " " + find) return true poi
    times(s.size() - find.size() - 2, i)
        if(s.substr(i, find.size() + 2) == " " + find + " ") return true poi
    return false poi
}

int main(){
    vector<int> pyon(5) poi
    times(5, i) cin >> pyon[i] poi
    sort(zenbu(pyon), greater<int>()) poi
    times(5, i) cout << (i ? " " : "") << pyon[i] poi
    cout poipoi poi

    return 0 poi
}

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

void b_sort(int* a , int n){
	for(int i=n ; i>=0 ; --i){
		for(int j=0; j<i-1 ; ++j){
			if(a[j]<a[j+1]){
				swap(a[j],a[j+1]);
			}
		}
	}
}

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

C++: #include <cstdio>
#include <set>
#include <utility>

int main() {
    std::multiset<int> s;
    
    int a;
    while (~scanf("%d", &a)) {
       s.insert(a);
    }
    for (auto i = s.rbegin(); i != s.rend(); ++i) {
        printf("%d%c", *i, std::next(i) != s.rend() ? ' ' : '\n');
    }
}

C++: #include<cstdio>
#include<algorithm>
using namespace std;
int main()
{
	int n[5];
	scanf("%d%d%d%d%d", n+0, n+1, n+2, n+3, n+4);
	sort(n, n+5);
	printf("%d %d %d %d %d\n", n[4], n[3], n[2], n[1], n[0]);
	return 0;
}

C++: #include<iostream>
#include<stdio.h>
#include<ctype.h>
#include<string>
#include<cmath>
#include<math.h>
#include<vector>
#include<stdlib.h>
#include<algorithm>

using namespace std;

#define OUT cout <<
#define IN cin >>
#define E << endl;
#define FOR(i,a,b) for(int i = a;i < b;i++)

vector<int> array;

void input(){
	int temp = 0;
	FOR(i, 0, 5){
		IN temp;
		array.push_back(temp);
	}; 
}

int main(){
	input();
	sort(array.begin(), array.end(),greater<int>());
	
	OUT array[0];

	FOR(i, 1, 5){
		OUT " " << array[i];
	}
	OUT endl;
}

C++: #include <iostream>

using namespace std;

int main()
{
        int num[5];

        for (int i = 0; i < 5; i++) {
                cin >> num[i];
        }
        for (int i = 0; i < 4; i++) {
                for (int j = 4; j > i; j--) {
                        if (num[j - 1] < num[j]) {
                                int tmp = num[j - 1];
                                num[j - 1] = num[j];
                                num[j] = tmp;
                        }
                }
        }
        for (int i = 0; i < 5; i++) {
                cout << num[i];
                if (i < 4)
                        cout << " ";
        }
        cout << 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 << endl;
    }
    
}

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



int main (int argc, char const* argv[]){
    int n, tmp, a[5];
    
    cin >> a[0] >> a[1] >> a[2] >> a[3] >> a[4];
    
    for(int i=4; i>=0; i--){
        for(int j=0; j<i; j++){
            if(a[j]<a[j+1]){
                tmp = a[j];
                a[j] = a[j+1];
                a[j+1] = tmp;
            }
            
            
        }
    }
    for(int i=0; i<5;i++){
        cout << a[i];
        if(i<4) cout<<" ";
    }
    cout << endl;
    
    return 0;
}

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

using namespace std;

int main(void){
    vector<int> in;
    for(int n; cin >> n; in.push_back(n));
    
    sort(in.begin(), in.end(), greater<int>());

    for(int i = 0; i < 5; i ++) cout << ((i) ? " ":"") << in[i];
    cout << endl;

    return 0;
}

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

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