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 <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--){
        if(i==0){
            cout<<a[i]<<endl;
        }
        else{
        cout<<a[i]<<" ";
        }
    }
    return 0;
}

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

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

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=-1;
	}
	else if(b>=c&&b>=d&&b>=e)
	{
		x[t]=b;
		b=-1;
	}
	else if(c>=d&&c>=e)
	{
		x[t]=c;
		c=-1;
	}
	else if(d>=e)
	{
		x[t]=d;
		d=-1;
	}
	else
	{
		x[t]=e;
		e=-1;
	}

	for(t=0;t<5;t++)
	{
		printf("%d ",x[t]);
	}
	return 0;
}

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

int main(){
   int num[5];
   int M1 = 0, M2 = 0, M3= 0 , M4= 0 , M5 = 0;
   int I1 = 0, I2 = 0, I3= 0 , I4= 0 , I5 = 0 ;
   cin >> num[0] >> num[1] >> num[2] >> num[3] >> num[4] ;

   for(int i=0 ; i < 5; i++){
      if(M1 < nim[i]) {
          M1 = num[i];
          I1 = i;
       }
    }

    for(int i=0 ; i < 5; i++){
        if(i == I1 ) continue;
        if(M2 < nim[i]) {
           M2 = num[i];
           I2 = i;
        }
     }

for(int i=0 ; i < 5; i++){
if(i == I1 || i == I2 ) continue;
if(M3 < nim[i]) {
M3 = num[i];
I3 = i;
}
}

for(int i=0 ; i < 5; i++){
if( i == I1 || i == I2 || i == I3 ) continue;
if(M4 < nim[i]) {
M4 = num[i];
I4 = i;
}
}

for(int i=0 ; i < 5; i++){
if( i == I1 || i == I2 || i == i3 || i == I4 ) continue;
if(M5 < nim[i]) {
M5 = num[i];
I5 = i;
}
}

cout << M1 << " " << M2 << " " << M3 << " " << M4 << " " << M5 << endl;

return 0 ;
}

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

int main()
{
    int val;
    vector<int> is;
    for (int i = 0; i < 5 && scanf("%d", &val); i++) 
        is.push_back(val);

    sort(is.begin(), is.end());
    for (int i = is.size() - 1; i > 0; i--)
        cout << is[i] << " ";
    cout << is[0] << endl;
}

C++: #include <iostream>
#include <cstdio>
#include <vector>
#include <algorithm>
#include <cmath>
#include <utility>

#define ll (long long)
#define REP(i,n) for(int i = 0;i<(int)n;i++)
#define FOR(i,a,b) for(int i = (a);i < (b);i++)
#define RFOR(i,a,b) for(int i = (a);i>(b);i--)

using namespace std;

/*thief??????*/

int main(void){
    
    int array[5] = {0};
    int size = sizeof(array) /sizeof(int);
    cin >> array[0] >> array[1] >> array[2] >> array[3] >> array[4];
    sort(array, array+size);
    RFOR(i, 4, -1) { cout << array[i]; if(i != 0) cout << " "; else cout << endl;}
    return 0;

}

C++: #include<iostream>
#include<algorithm>
using namespace std;
int a[5];

int main(){
	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;

	getchar();
	getchar();
	return 0;
}

C++: #include <sstream>
#include <string>
#include <vector>
#include <map>
#include <algorithm>
#include <iostream>
#include <utility>
#include <set>
#include <cctype>
#include <queue>
#include <stack>
#include <cstdio>
#include <cstdlib>
#include <cmath>
using namespace std;

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

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

C++: #include <iostream>
#include <vector>
#include <algorithm>
#define N 5
using namespace std;
int main() {
  vector<int> v1(N);
  for(int i = 0; i < N; ++i) {
	cin >> v1[i];
  }
  sort(v1.begin(), v1.end());
  reverse(v1.begin(), v1.end());
  for(int i = 0; i < N; ++i) {
	cout << v1[i];
	cout << ((i < N - 1) ? " " : "\n");
  }
  return 0;
}

C++: #include <algorithm>
#include <functional>
#include <cstdio>
#include <vector>
using namespace std;

int main(void)
{
	int num;
	vector<int> nums;
	for(int f1 = 0; f1 < 5; f1++)
	{
		scanf("%d", &num);
		nums.push_back(num);
	}
	sort(nums.begin(), nums.end(), greater<int>());
	vector<int>::iterator t = nums.begin();
	for(int f1 = 0; f1 < 5; f1++)
	{	
		if(f1 + 1 < 5)
		{
			printf("%d ",*(t + f1));
		}
		else
		{
			printf("%d",*(t + f1));
		}
	}
	return 0;
}

C++: /*
NOTE :
*min_element(.begin(),.end())
*max_element(.begin(),.end())
stack push pop top
queue push pop front
priority_queue<> pq
 push()  pop() size()  top()
map<>
 find() begin() end() insert(map<>::value_type())
pair<>
sort(.begin(), .end())
sort(arr, arr+N)
sort(a, a+N, greater<int>())
binary_search(vc.begin(), vc.end(), x)  //binary_search???true, false?????????
vector<int>::iterator lit = lower_bound(vc.begin(), vc.end(), x);
  lower_bound?????????????????????"??\???"????????????????????????????????????????????¬???????????????
vector<int>::iterator uit = upper_bound(vc.begin(), vc.end(), x);
  upper_bound????????????????????????"?¶???????"?????????????????????????????????????????¬???????????????
*/
#include <iostream>
#include <cstdio>
#include <climits>
#include <cmath>
#include <cassert>
#include <sstream>
#include <algorithm>
#include <valarray>
#include <utility>
#include <vector>
#include <string>
#include <stack>
#include <queue>
#include <map>
#include <set>

#define MAX 100
#define INF 1<<20
#define LLINF 10e12 // 1<<31 // 2^31
#define REP(i,n) for(int i=0;i<n;i++)
#define REP2(i,a,n) for(int i=(a);i<(n);i++)
#define SET(a,c) memset(a,c,sizeof a)
#define FOR(i,c) for(__typeof((c).begin())i=(c).begin();i!=(c).end();++i)
#define FOREACH(i,c) for(auto (i) : (c))
#define BIT(i,j) ((i)>>(j))&1
#define ALL(o) (o).begin(), (o).end()
#define ERASE(o) (o).erase(unique(ALL((o))), (o).end());

using namespace std;
typedef long long ll;
typedef valarray<int> array_t;
/////

int main()
{
  cin.tie(0);
  ios::sync_with_stdio(false);
  // FROM HERE
  vector<int> a(5);
  REP(i,5) cin >> a[i];
  sort(ALL(a),greater<int>());
  REP(i,5) printf("%d%s",a[i],(i==4)?"\n":" ");
  return 0;
}

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

int main()
{
    int Number[5];
    int Temp;

    for(int i = 0; i < 5; i++)
    {
        cin >> Number[i];
    }
    {
        for(int x = 0; x < 5; x++)
        {
            for(int z = 0; z < 5; z++)
            {
                if(Number[z] < Number[z+1])
                {
                    Temp = Number[z+1];
                    Number[z+1] = Number[z];
                    Number[z] = Temp;
                }
            }
        }

        for(int y = 0; y < 5; y++)
        {
            cout << Number[y] << " ";
        }


    }
    cout << endl;
    return 0;

}