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<algorithm>
using namespace std;

int main(){

  int n[5];

  for(int i=0;i<5;i++) cin>>n[i];

  sort(n, n+5);

  for(int i=0;i<5;i++){
      cout<<n[4-i];
      if(i==4) cout<<endl;
      else cout<<" ";
    }
	
  return 0;
}

C++: #include <iostream>
#include<algorithm>
using namespace std;
bool cmp(int a,int b){
	return a>b;
}
int main(int argc, char** argv) {
	int a[5];
	for(int i=0;i<5;i++){
		cin>>a[i];
	}
	sort(a,a+5,cmp);
	for(int i=0;i<4;i++)
		cout<<a[i]<<" ";
	cout<<a[4];
	return 0;
}

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

int main(){
  int a, b, c, d, e;
  vector<int> x;

  cin >> a >> b >> c >> d >> e;

  x.push_back(a);
  x.push_back(b);
  x.push_back(c);
  x.push_back(d);
  x.push_back(e);

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

  for(int i=0; i<x.size(); i++) {
    cout << x[i] << " ";
  }

  cout << "\n";

  return 0;
}

C++: #include<bits/stdc++.h>;
using namespace std;
int main(){
int a[5];
for( 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] << endl;
}
return 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);
  reverse(a,a+5);

  for(int i=0;i<4;i++) cout << a[i] << ' ';

  cout << a[4] << endl;
}

C++: #include<iostream>

int main(){
    int a[5],i,j,n;
    
    for(i=0;i<5;i++){
        std::cin>>a[i];
         }
    for(i=0;i<5;i++){
        for(j=i+1;j<5;j++){
            if(a[i]<a[j]){
            n=a[i];
            a[i]=a[j];
            a[j]=n;
            	     }
                 }
            }
            
    for(i=0;i<4;i++){
    std::cout<<a[i]<<" ";
    }
             
return 0;
}

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

int main() {
	int a, b, c, d, e;
	while (std::cin >> a >> b >> c >> d >> e) {
		std::set<int> sort;
		sort.insert(a); sort.insert(b); sort.insert(c); sort.insert(d); sort.insert(e);
		int i = 0;
		for (std::set<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(){
	vector<int> v(5);
	for(int i = 0; i < 5; i++){
		scanf("%d",&v[i]);
	}
	sort(v.rbegin(), v.rend());
	for(int i = 0; i < 5; i++){
		printf("%d ", v[i]);
	}
	printf("\n");
	return 0;
}

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

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

using namespace std;

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

C++: #include<iostream>
#include<string>
#include<algorithm>
#include<map>
#include<set>
#include<utility>
#include<vector>
#include<cmath>
#include<cstdio>
#define loop(i,a,b) for(int i=a;i<b;i++) 
#define rep(i,a) loop(i,0,a)
#define pb push_back
#define mp make_pair
#define it ::iterator
#define all(in) in.begin(),in.end()
const double PI=acos(-1);
const double ESP=1e-10;
using namespace std;
int main(){

  vector<int>in(5);
  rep(i,5)cin>>in[i];

  sort(in.begin(),in.end());

  rep(i,4)cout<<in[4-i]<<" ";
  cout<<in[0]<<endl;

}

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

int main(){
    int arr[5];

    for(int i=0; i<5; i++){
        cin >> arr[i];
    }

    for(int i=0; i<4; i++){
        for(int j=i+1; j<5; j++){
            if(arr[i]<arr[j]){
                int temp;
                temp = arr[i];
                arr[i] = arr[j];
                arr[j] = temp;
            }
        }
    }

    cout << arr[0];
    for(int i=1; i<5; i++){
        cout << ' ' << arr[i];
    }
return 0;
}

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

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

using namespace std;

int main(){
  int a[5],i,j,min,min_n;

  for(i=0:i<5;i++)
    scanf("%d",&a[i]);

  for(i=0;i<5;i++){
    min=a[i]; min_n=i;
    for(j=i+1;j<5;j++){
      if(min>a[j]){
        min=a[j]; min_n=j;
      }
    swap(a[i],a[min]);
    printf( i<4 ? "%d " : "%d\n",a[i]);
   }

  return 0;
}

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

int main(){
    int n,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]<<" ";
    
       /* if(i==0){
            cout<<endl;
        }*/   
    }   
    return 0;
}

C++: #include <iostream>
#include <algorithm>
#include <cstdio>
#include <deque>
#include <functional>

using namespace std;

int main(void)
{
	int a,b,c,d,e;
	while(cin>>a>>b>>c>>d>>e)
	{
		deque<int> nums;
		nums.push_back(a);
		nums.push_back(b);
		nums.push_back(c);
		nums.push_back(d);
		nums.push_back(e);
		sort( nums.begin(), nums.end(), greater<int>() );
		deque<int>::iterator it = nums.begin();
		while( it != nums.end() )
		{
			cout<<*it<<" ";
			++it;
		}
	}
	return 0;
}

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

int main() {
  int n[5];

  for (int i = 0; i < 5; i++) {
    cin >> n[i];
  }
  sort(n, n + 5);
  for (int i = 4; i >= 0; i--) {
    cout << n[i], << endl;;
  }
}

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

C++: #include<iostream>
#include<algorithm>
using namespace std;
int main(){

  int a[5],n=5;
  while(n--) cin >> a[n];
  sort(a,a+5);
  for(int i = 4;i >= 0;i--){
    if(i != 0) cout << a[i] << ' ';
    else cout << a[i] << endl;
  }
  return (0);
}