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 <stdio.h>
#include <iostream>

using namespace std;

int main() {

	int a[5];
	int kari;

	cin >> a[0] >> a[1] >> a[2] >> a[3] >> a[4];

	for (int j = 4; j > 0; j--) {
		for (int i = 0; i < j; i++) {
			if(a[i] < a[i+1]) {
				kari = a[i];
				a[i] = a[i+1];
				a[i+1] = kari;
			}
		}
	}

	cout << a[0];

	for (int i = 1; i < 5; i++) {
		cout << " " << a[i] ;
	}

	cout << endl;

	return 0;
}

C++: #include<iostream>
#include<vector>
#include<algorithm>
using namespace std;
int main(){
  vector<int> num(5);
  for(int i=0; i<5; i++) cin >>num[i];
  sort(num.begin(),num.end());
  for(int i=0; i<5; i++){
    cout <<num[4-i];
    if(i == 4) cout <<endl;
    else cout <<" ";
  }
  return 0;
}

C++: #include<iostream>
#include<algorithm>
using namespace std;
int main(){
  int num[5];
  cin >>num[0]>>num[1]>>num[2]>>num[3]>>num[4];
  sort(num,num+5);
  cout <<num[0]<<" "<<num[1]<<" "<<num[2]<<" "<<num[3]<<" "<<num[4]<<endl;
  return 0;
}

C++: #include <iostream>
#include <cstdio>
#include <cstring>
#include <cctype>
#include <string>
#include <cmath>
#include <algorithm>
#define DATA_NUM 5
#define swap(type, x, y) do{type temp = x; x = y; y = temp;}while(0);

using namespace std;

void quick_sort(int x[], int left, int right);
int main(void) {
    int x[DATA_NUM] = {0};
    int i;
    
    for(i = 0; i < DATA_NUM; i++)
        scanf("%d", &x[i]);
    
    quick_sort(x, 0, DATA_NUM - 1);
    
    for(i = DATA_NUM - 1; i >= 0; i--) {
        cout << x[i];
        (i) ? putchar(' ') : putchar('\n');
    }
    
    return(0);
}

void quick_sort(int x[], int left, int right) {
    int i, j;
    int pivot;
    i = left;
    j = right;
    pivot = x[(left + right) / 2];
    
    while(1) {
        while(x[i] < pivot) i++;
        while(x[j] > pivot) j--;
        
        if(i >= j) break;
        
        swap(int, x[i], x[j]);
        i++;
        j--;
    }
    if(i - 1 > left) quick_sort(x, left, i - 1);
    if(j + 1 < right) quick_sort(x, j + 1, right);
}

C++: #include <stdio.h> 
void qsort(int *data,int size);
void swap(int *a,int *b);
int main(void){
int i;
int data[5];
for(i=0;i<5;i++) scanf("%d",&data[i]);
qsort(data,5);
for(i=0;i<5;i++) printf("%d ",data[i]);
return 0;
}
void qsort(int *data,int size){
int i,last=1;
if(size<2)return;
for(i=1;i<size;i++){
if(data[0]<data[i]){ swap(&data[last],&data[i]);
last++;
}
}
swap(&data[0],&data[last-1]);
qsort(data,last);
qsort(data+last,size-last);
}
void swap(int *a,int *b){
int work;
work=a[0];
a[0]=b[0];
b[0]=work;
}

C++: #include<iostream>
using namespace std;
int main()
{
	int x, b, c, d, e, a[6], i, j;
	cin >> x >> b >> c >> d >> e;
	a[0] = x;
	a[1] = b;
	a[2] = c;
	a[3] = d;
	a[4] = e;
	for ( j = 0;j < 5; j++)
	{	for ( i = 0;i < 5; i++)
		{
			if (a[i] >= a[i + 1])a[i + 1] = a[i];
		}
	}
	cout << a[0] << " " <<a[1] << " " << a[2] << " " << a[3] << " " << a[4] << endl;
return 0;
}

C++: #include<iostream>
using namespace std;
int main(void)
{
    int num[6],sta;
    for(int i=0;i<5;i++){
        cin>>num[i];
    }
    for(int i=0;i<4;i++){
        for(int j=0;j<4;j++){
            if(num[j]<num[j+1]){
                sta=num[j];
                num[j]=num[j+1];
                num[j+1]=sta;
            }
        }
    }
    for(int i=0;i<5;i++){
        cout<<num[i];
        if(i==4)cout<<"\n";
        else cout<<" ";
    }
}

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

int main()
{
  int a[5]={0};
  int i;
  for(i=0; i<5; i++){
    scanf("%d", &a[i]);
  }

  sort(a,a+5);

  for(i=4; i>=0; i--){
    printf("%d",a[i]);
    if(i!=0)printf(" ");
  }
  puts("");
}

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

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

using namespace std;

int main()
{
   int a[5];
   scanf("%d%d%d%d%d",&a[0],&a[1],&a[2],&a[3],&a[4]);
   sort(a,a+5);
   for(int i=4;i>=0;i--)
   {
       printf("%d",a[i]);
       if(i>0) printf(" ");
       else printf("\n");
   }
}

C++: #include<iostream>
#include<algorithm>
using namespace std;
int main(){
  int num[5];
  
  for(int i = 0; i = 4; i++)
    cin >> num[i];

  sort(num, num + 5);

  for(int i = 4; i = 1; i--)
    cout << num[i] << " ";

  cout << num[0] << "\n";
}

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

using namespace std;

#define reps(i,f,n) for(int i=f;i<int(n);i++)
#define rep(i,n) reps(i,0,n)



int main(){
	
	vector<int> a;
	rep(i,5){
		int b;
		cin>>b;
		a.push_back(b);
	}
	sort(a.begin(),a.end());
	reverse(a.begin(),a.end());
	rep(i,5)printf("%d ",a[i]);puts("");
}

C++: #include <iostream>

using namespace std;

int SolvedPuzzle[100];

int main()
{
    cin >> SolvedPuzzle[0] >> SolvedPuzzle[1] >> SolvedPuzzle[2] >> SolvedPuzzle[3] >> SolvedPuzzle[4];

    for(int x=0; x<4; x++)
    {
        for(int y=0; y<4; y++)
        {
            if(SolvedPuzzle[y]<SolvedPuzzle[y+1])
            {
                int temp;
                temp = SolvedPuzzle[y+1];
                SolvedPuzzle[y+1] = SolvedPuzzle[y];
                SolvedPuzzle[y] = temp;

            }
        }
    }
    cout << SolvedPuzzle[0] << " " << SolvedPuzzle[1] << " " << SolvedPuzzle[2] << " " << SolvedPuzzle[3] << " " << SolvedPuzzle[4] << endl;

}

C++: #include <stdio.h>

int main(void) {

  int seq[5];
  int i,j,temp;

  scanf("%d %d %d %d %d",&seq[0],&seq[1],&seq[2],&seq[3],&seq[4]);

  for(i=0;i<4;i++) {
    for(j=0;j<4-i;j++) {
      if(seq[j]<seq[j+1]) {
	temp=seq[j];
	seq[j]=seq[j+1];
	seq[j+1]=temp;
      }
    }
  }

  for(i=0;i<5;i++) {
    if(i==0) printf("%d",seq[i]);
    else printf(" %d",seq[i]);
  }

  puts("");
  
  return 0;
}

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

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

int main(){
  int a, b, c, d, e, f, g, h, i;
  cin >> a >> b >> c >> d >> e;

  if(a > b) f = a, a = b;
  else f = b;

  if(a > c) g = f, f = a, a = c;
  else if(a <= c && c < f) g = f, f = c;
  else g = c;

  if(a > d)  h = g, g = f, f = a, a = d;
  else if(a <= d && d < f) h = g, g = f, f = d;
  else if(f <= d && d < g) h = g, g = d;
  else h = d;

  if(a > e) i = h, h = g, g = f, f = a, a = e;
  else if(a <= e && e < f) i = h, h = g, g = f, f = e;
  else if(f <= e && e < g) i = h, h = g, g = e;
  else if(g <= e && e < h) i = h, h = e;
  else i = e;

  cout << i << " " << h << " " << g << " " << f << " " << a << endl;

  return 0;
}

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

using namespace std;

int main()
{
  vector<int> num;
  int i, x;
  for (i = 0; i < 5; i++) {
    cin >> x;
		num.push_back(x);
  }

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

  for (i = 0; i < 5; i++) {
		if (i == 4) {
      cout << num[i] << endl;
			break;
    }
    cout << num[i] << " ";
  }

  return 0;
}