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

C++: #include <iostream>
#include <vector>
#include <queue>
#include <stack>
#include <map>
#include <set>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <functional>
#include <string>
#include <algorithm>
#include <string>
#include <climits>

#define REP(i, n) for (int (i) = 0; (i) < (int)(n); (i)++)
#define REG(i, a, b) for (int (i) = ((int)(a)); (i) < ((int)(b)); i++)
#define ALL(V) (V).begin(), (V).end()
#define PRINT(STR) cout << (STR) << endl

typedef long long ll;
using namespace std;

int nextInt() {
	int n = -1;
	cin >> n;
	return n;
}

int main() {
	cin.tie(0); //対話型には使えない
	ios::sync_with_stdio(false); //printfと共には使えない
	vector<int> numbers (5);
	REP(i, 5) {
		numbers[i] = nextInt();
	}
	sort(ALL(numbers));
	reverse(ALL(numbers));
	REP(i, 4) {
		cout << numbers[i] << " ";
	}
	cout << numbers[4] << endl;

	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++) {
		if (i != 1) {
			cout << " ";
		}
		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 < 5; i++) {
		cout << date[i];
	}
}

C++: #include<iostream>
#include<set>
#include<string>

int main() {
	int a, b, c, d, e;
	while (std::cin >> a >> b >> c >> d >> e) {
		std::multiset<int> sort;
		sort.insert(a); sort.insert(b); sort.insert(c); sort.insert(d); sort.insert(e);
		int i = 0;
		for (std::multiset<int>::reverse_iterator itr = sort.rbegin(); itr != sort.rend(); itr++) {
			std::cout << *itr;
			if (i < 4) std::cout << " ";
			i++;
		}
		std::cout << std::endl;
	}
	return 0;
}

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


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

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

int main() {
  int x[5],xi;
  cin >> x[0] >> x[1] >> x[2] >> x[3] >> x[4];
  for(int i=0;i<5;i++) {
    for(int j=i;j<5;j++) {
      if(x[i] < x[j]) {
        xi = x[i];
        x[i] = x[j];
        x[j] = xi;
      }
    }
  }
  for(int i=0;i<5;i++) {
    cout << x[i] << " ";
  }
}

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

using namespace std;

int line[5];

int main()
{
	for(int i=0;i<5;i++)scanf("%d",&line[i]);
	sort(line,line+5);
	for(int i=4;i>=0;i--)
	{
		printf("%d",line[i]);
		if(i!=0)printf(" ");
	}
	printf("\n");
	return 0;
}

C++: #include<iostream>

using namespace std;

int main(){
  int list[5], i, j, temp;
  cin >> list[0] >> list[1] >> list[2] >> list[3] >> list[4];
  for(i=0; i<5; i++){
    for(j=i+1; j<5; j++){
      if(list[i] <= list[j]){
	temp = list[i];
	list[i] = list[j];
	list[j] = temp;
      }
    }
  }
  for(i=0; i<4; i++)cout << list[i] << " ";
  cout << list[4] << endl;
}

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