Go: package main

import (
        "fmt"
        "sort"
)


func main() {
        var s []int
        var n int
        for i := 0; i < 5; i++ {
                fmt.Scanf("%d", &n)
                s = append(s, n)
        }
        sort.Ints(s)
        for i:= 1; i <= len(s); i++ {
                fmt.Printf("%d", s[len(s)-i])
                if i < len(s) {
                        fmt.Printf(" ")
                }
        }
        fmt.Printf("\n")
}

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<4;i++) {
    cout << x[i] << " ";
  }
  cout << x[4] <<endl;
}

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

using namespace std;

int arr[5];

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

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

using namespace std;

int main()
{
	for(int a[5];scanf("%d%d%d%d%d",a,a+1,a+2,a+3,a+4)==5;){
		sort(a,a+5);
		reverse(a,a+5);
		printf("%d %d %d %d %d\n",a[0],a[1],a[2],a[3],a[4]);
	}
	
	return 0;
}

C++: #include<iostream>
#include<vector>
#include<algorithm>
using namespace std;
int main(){
  vector<int> a;
  int ptr=0;
  int tmp;
  while(cin>>tmp) a.push_back(tmp);
  stable_sort(a.begin(),a.end());
  for(int i=0;i<a.size();++i) cout<<a[i]<<" ";
  cout<<endl;
  return 0;
}

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

using namespace std;

void solve()
{
	vector<int> Vec(5);
	for(unsigned int i = 0; i < Vec.size(); ++i)
	{
		cin >> Vec[i];
	}
	sort(Vec.begin(), Vec.end());
	for(unsigned int i = Vec.size() - 1; i > 0; --i)
	{
		cout << Vec[i] << " ";
	}
	cout << Vec[0] << endl;
}

int main()
{
	solve();
	return(0);
}

C++: #include <iostream>
#include <vector>
#include <string.h>
#include <algorithm>

#if 0
#define DEBUG_0331
#endif

static int getNumbers(std::vector<int>& vec);
static int sortNumbers(std::vector<int>& vec);
static void pushNumbers(std::vector<int>& vec);

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

    getNumbers(vector);
    sortNumbers(vector);
    pushNumbers(vector);
#ifdef DEBUG_0331
    for (int i = 0; i < vector.size(); i++ ) {
        std::cout << vector.at(i) << std::endl;
    }
#endif
    return 0;
}

static int getNumbers(std::vector<int>& vec)
{
    std::string s1("");
    char ss1[512] = {0};
    char *p = NULL;

    if ( 0x00 == &vec ) {
        return 1;
    }

    std::getline(std::cin, s1);

    p = ss1;
    memset(ss1, '\0', sizeof(ss1));
    memcpy(ss1, s1.c_str(), sizeof(ss1));
    // split
    while (*p) {
        if (' ' != *p) {
            vec.push_back(*p - '0');
        }
        p++;
    }

    return 0;
}

static int sortNumbers(std::vector<int>& vec)
{
    if ( 0x00 == &vec ) {
        return 1;
    }

    // sort
    std::sort(vec.begin(), vec.end(), std::greater<int>());

    return 0;
}

static void pushNumbers(std::vector<int>& vec)
{
    if ( 0x00 == &vec ) {
        return;
    }

    for (unsigned int i = 0; i < vec.size(); i++) {
        std::cout << vec.at(i);
        if (vec.size() - 1 == i) {
            std::cout << '\n';
        } else {
            std::cout << ' ';
        }
    }
}

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

	printf("%d %d %d %d %d\n", a[4], a[3], a[2], a[1], a[0]);

}

C++: #include <iostream>
#include <algorithm>
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 = 4; i>0; i--){
		cout << a[i] << " ";
	}
	cout << a[0] << endl;
	return 0;
}

C++: #include <bits/stdc++.h>

//const static double	de_PI	= 3.14159265358979323846;
//const static int	de_MOD	= 1000000007;
//const static int	de_MAX	= 999999999;
//const static int	de_MIN = -999999999;

int main(void) {

	//std::ifstream in("123.txt");	std::cin.rdbuf(in.rdbuf());

	std::vector<int> ans(5);
	for (int i = 0; i < 5; i++) {
		std::cin >> ans[i];
	}
	std::sort(ans.begin(), ans.end());
	for (int i = 4; i >= 1; i--) {
		std::cout << ans[i] << " ";
	}
	std::cout << ans[0] << std::endl;

}

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

int main() {
	// your code goes here
	long long int a[5];
	for(int i=0;i<5;i++) cin >> a[i];
	for(int i=4;i>0;i--) cout << a[i] << " ";
	cout << a[0] << endl;
	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<5; i++)cout << list[i] << " ";
  cout << endl;
}

C++: #include <iostream>
#include <vector>
#include <string.h>
#include <algorithm>

#if 0
#define DEBUG_0331
#endif

static int getNumbers(std::vector<int>& vec);
static int sortNumbers(std::vector<int>& vec);
static void pushNumbers(std::vector<int>& vec);

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

    getNumbers(vector);
    sortNumbers(vector);
    pushNumbers(vector);
#ifdef DEBUG_0331
    for (int i = 0; i < vector.size(); i++ ) {
        std::cout << vector.at(i) << std::endl;
    }
#endif
    return 0;
}

static int getNumbers(std::vector<int>& vec)
{
    std::string s1("");
    char ss1[30] = {0};
    char *p = NULL;

    if ( 0x00 == &vec ) {
        return 1;
    }

    std::getline(std::cin, s1);

    p = ss1;
    memset(ss1, '\0', sizeof(ss1));
    memcpy(ss1, s1.c_str(), sizeof(ss1));
    // split
    while (*p) {
        if (' ' != *p) {
            vec.push_back(*p - '0');
        }
        p++;
    }

    return 0;
}

static int sortNumbers(std::vector<int>& vec)
{
    if ( 0x00 == &vec ) {
        return 1;
    }

    // sort
    std::sort(vec.begin(), vec.end(), std::greater<int>());

    return 0;
}

static void pushNumbers(std::vector<int>& vec)
{
    if ( 0x00 == &vec ) {
        return;
    }

    for (unsigned int i = 0; i < vec.size(); i++) {
        std::cout << vec.at(i);
        if (vec.size() - 1 == i) {
            std::cout << '\n';
        } else {
            std::cout << ' ';
        }
    }
}

C++: #include <iostream>
#include <algorithm>
using namespace std;
int main() {
  int a, b, c, d, e;
  vector<int> v;
  v.push_back(a);
  v.push_back(b);
  v.push_back(c);
  v.push_back(d);
  v.push_back(e);
  sort(v.begin(), v.end(), greater<int>);
  for (int i = 0; i < v.size(); ++i) {
    cout << v[i];
    if (i < v.size() - 1) {
      cout << " ";
    }
  }
  cout << endl;
  return 0;
}