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 = 4; i >= 0; i++) {
    cout << n[i];
    if (i != 0) cout << " ";
  } 
  cout << endl;
}

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

using namespace std;


int main(){
	int a[5];

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

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

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

C++: #include<stdio.h> 

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

		for(i=0;i<4;i++){
			for(j=i+1;j<5;j++){
				if(data[i]<data[j]){
					temp=data[i];
					data[i]=data[j];
					data[j]=temp;
				}
			}
		}
		
		for(i=0;i<4;i++){
			printf("%d　",data[i]);
		}

		printf("%d\n",data[5-1]);

		return 0;
}

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

	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>
#include<vector>
#include<algorithm>
#include<functional>
using namespace std;

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

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

	for (int i = 0; i < 5; ++i){
		cout << n[i];
	}

	return 0;
}

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<5; i++){
  for(int j=i+1; j<5; j++){
   if(num[i] < num[j]){
    int tmp = num[i];
    num[i] = num[j];
    num[j] = tmp;
   }
  }
 }

 for(int i=0; i<5; i++){
  cout << num[i];
  if(i == 4) break;
  cout << ' ';
 }
 cout << '\n';

 return 0;
}

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

int quick(int a[],int left,int right)
{
	int i=left,j=right,mid;
	mid=(a[i]+a[j])/2;
	while(i<=j)
	{
		while(a[i]<mid)
			i++;
		while(a[j]>mid)
			j--;
		if(i<=j)
		{
			int temp;
			temp=a[i];
			a[i]=a[j];
			a[j]=temp;
			i++;
			j--;
		}
	}
	if(left<j)
		quick(a,left,j);
	if(i<right)
		quick(a,i,right);
}

int main()
{
	int data[5],i,j;
	for(i=0;(cin>>data[i++]>>data[i++]>>data[i++]>>data[i++]>>data[i++]);){
        quick(data,0,4);
        for(j=0;j<5;j++){
            if(j==4)
                cout<<data[j]<<" \n";
            else cout<<data[j]<<" ";
        }
	}

	return 0;
}
/*
3 6 9 7 5

*/

C++: #include<bits/stdc++.h>
using namespace std;
signed main(void){
	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<<endl;
}

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

typedef uint32_t u32;
typedef uint64_t u64;

int main() {

  int a[5];
  for(u32 i = 0; i < 5; ++i) {
    std::cin >> a[i];
  }

  std::sort(a, a + 5);
  std::reverse(a, a + 5);

  std::cout << a[0];
  for(int i = 1; i < 5; ++i) {
    std::cout << " " << a[i];
  }
  std::cout << std::endl;
  
  return 0;
}

C++: 


#include <iostream>
#include <string>
#include <cstdio>
#include <cstring>
#include <algorithm>
#include <vector>


using namespace std;
int main()
{
    int a, b, c, d, e;
    scanf("%d%d%d%d%d", &a, &b, &c,&d,&e);
    int x[5];
    x[0] = a;
    x[1] = b;
    x[2] = c;
    x[3] = d;
    x[4] = e;

    sort(x, x+5);
    

    int i;
    for(i = 0; i < 4;i++){
        printf("%d ", x[i]);
    }
    printf("%d\n", x[4]);
    return 0;
}

C++: #include <bits/stdc++.h>
using namespace std;
int main()
{
    int a[5],i;

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

    sort(a, a+5, greater<int>());

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

    return 0;
}

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

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

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

C++: #include <stdio.h>
#define NUMBER 5

int main() {
	int input[NUMBER];
	int temp;
	int last_ch = NUMBER - 1;
	int temp_ch;

	int i;

	for(i = 0; i < NUMBER; i++)
		scanf("%d", &input[i]);

	/* 左の方が小さかった場合には入れ替える。 */
	while(last_ch) {
		temp_ch = 0;
		for(i = 0; i < last_ch; i++) {
			if(input[i] < input[i + 1]) {
				temp = input[i];
				input[i] = input[i + 1];
				input[i + 1] = temp;
				temp_ch = i + 1;
			}
		}
		last_ch = temp_ch;
	}
	
	for(i = 0; i < NUMBER - 1; i++) 
		printf("%d ", input[i]);

	printf("%d\n", input[NUMBER - 1]);

	return 0;
}

C++: #include<iostream>
using namespace std;
int main(){
  int a[5],tmp;
  for(int i=0;i<5;i++){
    cin >> a[i];
  }
  for(int i=0;i<5;i++){
    for(int j=0;j<4;j++){
      if(a[j] < a[j+1]){
	tmp = a[j];a[j] = a[j+1]; a[j+1] = tmp;
      }
    }
  }
    for(int i=0;i<4;i++){
      cout << a[i] << " ";
    }
    cout << a[4] << endl;
}

C++: //#define _USE_MATH_DEFINES
//#include <cmath>
#include <iostream>
//#include <stdio.h>
//#include <stdlib.h>
//#include <iomanip>
#include <vector>
//#include <string>
//#include <algorithm>
//#include <functional>
//#include <time.h>
//#include <sstream>
#include <queue>

using namespace std;


int main(){

	int buf;
	priority_queue <int> pq;

	while (cin >> buf){
		pq.push(buf);
	}

	while (pq.size()){
		cout << pq.top() << " ";
		pq.pop();
	}

	return 0;
}

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<4;i++){
		for(j=i+1;j<5;j++){
			if(a[i]<a[j]){
			n=a[i];
			a[i]=a[j];
			a[j]=n;
			}
		}
	}
	std::cout<<a[0]<<" "<<a[1]<<" "<<a[2]<<" "<<a[3]<<" "<<a[4]<<std::endl;
	return 0;
}

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

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