Go: package main

import (
	"fmt"
	"sort"
)

func main() {
	var a, b, c, d, e int
	fmt.Scan(&a, &b, &c, &d, &e)
	dataset := []int{a, b, c, d, e}

	sort.Sort(sort.Reverse(sort.IntSlice(dataset)))
	fmt.Printf("%d %d %d %d %d\n", dataset[0], dataset[1], dataset[2], dataset[3], dataset[4])
}

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

using namespace std;

int main() {
	int in;
	vector<int> s;
	while (cin >> in ) s.push_back(in);
	
	sort(s.begin(), s.end(), greater<int>());
	
	for (int i=0; i<(int)s.size(); i++) {
		cout << s[i];
		if (i<(int)s.size()-1) cout << " ";
	} 
	cout << endl;

	return 0;
}

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

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

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

	std::sort(v.begin(),v.end());

	for(int i=4;i>0;--i)
	{
		std::cout << v[i] << ' ';
	}

	std::cout << v[0];
}

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

int main(void)
{
	int a[n],i,j,t;

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

	for( i = 1; i < n; ++i )
	{
		t = a[i];
		for( j = i; j > 0 && a[j-1] > t; --j )
		{
			a[j] = a[j-1];
		}
		a[j] = t;
	}
	for(i=n-1;i>-1;i--)
		printf("%d ",a[i]);
	printf("\b\n");
  return 0;
}

C++: #include<iostream>
using namespace std;
int main() {
	int a[11],date[11];
	for (int i = 1; i <= 5; i++) {
		cin >> a[i];
	}
	int dai = -999999;
	int o;
	for (int i = 1; i <= 5; i++) {
		int dai = -999999;
		for (int z = 1; z <= 5; z++) {
			if (dai <= a[z]) {
				dai = a[z];
				o = z;
			}
		}
		date[i] = dai;
		a[o] = -9999999;
	}
	for (int i = 1; i <= 4; i++) {
		cout << date[i]<<" ";
	}
	cout << date[5] << endl;
}

C++: #include<bits/stdc++.h>
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+b);
for(int i=0;i<5;i++){
if(i) cout<<" ";
cout<<a[i];
}
}

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

C++: #include<iostream>
#include<vector>
std::vector<int> qsort(std::vector<int> xs);


int main(){
	std::vector<int> vec(5);
	for(int i=0;i<5;i++){
		std::cin>>vec[i];
	}
	vec=qsort(vec);
	for(int i=4;i>-1;i--){
		std::cout<<vec[i];
		if(i!=0)std::cout<<" ";
		else std::cout<<std::endl;
	}
	
	
	return 0;
}

std::vector<int> qsort(std::vector<int> xs){

	if(xs.empty())return xs;
	else{
			int x=xs[0];
		std::vector<int> left;
		std::vector<int> right;
		for(int i=1;i<xs.size();i++){
			if(x>xs[i])left.push_back(xs[i]);
			else if(x<=xs[i])right.push_back(xs[i]);
		}
		left=qsort(left);
		right=qsort(right);
		left.push_back(x);
		left.insert(left.end(),right.begin(),right.end());
		return left;
	}
}

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

int main(){

int a,b,c,d,e;
cin >> a >> b >> c >> d >> e;
int r = 0;
if(a < b){
r = a;
a = b;
b = r;
}
if(a < c){
r = a;
a = c;
c = r;
}
if(a < d){
r = a;
a = d;
d = r;
}
if(a < e){
r = a;
a = e;
e = r;
}

if(b < c){
r = b;
b = c;
c = r;
}
if(b < d){
r = b;
b = d;
d = r;
}
if(b < e){
r = b;
b = e;
e = r;
}
if(c < d){
r = c;
c = d;
d = r;
}
if(c < e){
r = c;
c = e;
e = r;
}
if(d < e){
r = d;
d = e;
e = r;
} 
cout << a << b << c << d << e << endl;
    return 0;
}

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 <vector>
#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>());
  for(int i=0;i<5;i++){
    cout << n[i];
    if(i==4) break;
    cout << ' ';
  }
  cout << endl;
  return 0;
}

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

int main()
{
    std::vector<int> Numbers;
    for(std::size_t i = 0; i < 5; ++i){
        int n;
        std::cin >> n;
        Numbers.push_back(n);
    }
    std::sort(Numbers.begin(), Numbers.end(), std::greater<int>());
    for(std::size_t i = 0; i < Numbers.size(); ++i){
        if(i) std::cout << " ";
        std::cout << Numbers[i];
    }
    std::cout << std::endl;
    return 0;
}

C++: #include<stdio.h>
#include<algorithm>
using namespace std;
long long int a[5];
int main()
{
	int i;
	for (i = 0; i < 5; i++)
	{
		scanf("%lld ", &a[i]);
	}
	sort(a, a + 5);
	for (i = 4; i>=0; i--)
	{ if (i!=0)
		printf("%lld ", a[i]);
	else
	{
		printf("%lld\n", a[i]);

	}
	}
	return 0;

}

C++: #include<bits/stdc++.h>
#define rep(i,n) for(int i=0;i<(n);i++)
#define loop(i,x,n) for(int i=(x);i<(n);i++)
#define all(x) (x).begin(),(x).end()
#define pb push_back
#define mp make_pair
#define fir first
#define sec second
#define ub upper_bound
#define lb lower_bound
#define int long long
using namespace std;
const int MOD=1000000007;
const int INF=1000000009;

signed main(){
  vector<int>v(5);
  rep(i,5)cin>>v[i];
  sort(v.begin(),v.end(),greater<int>());
  rep(i,5){
    cout<<v[i];
    if(i<4)cout<<' ';
  }
  cout<<endl;
  return 0;
}

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

using namespace std;

int comp(int a,int b){
    int buffer;
    if(a > b){
        b = buffer;
        b = a;
        a = buffer;
        return 1;
    }
    else{
        return 0;
    }
}

int main(){
    int k[5];
    cin >> k[0] >> k[1] >> k[2] >> k[3] >> k[4];
    while(comp(k[0],k[1]) || comp(k[1],k[2]) || comp(k[2],k[3]) || comp(k[3],k[4])){
    }
    cout << k[4] << " " << k[3] << " " << k[2] << " " << k[1] << " " << k[0] << endl;
    return 0;
}

C++: #include<iostream>
#include<algorithm>
#include <functional>
using namespace std;
int main(){
	int d[6]={};
	for(int i=0;i<5;i++){
		cin>>d[i];
	}
	sort(d,d+5,greater<int>());
	for(int i=0;i<5;i++){
		cout<<d[i]<<" ";
	}
	cout<<endl;
	
	
	return 0;
}

C++: /*AOJ 0018*/

#include<iostream>
using namespace std;

#define N 5

void Swap(int *a,int *b){
	int tmp = *a;
	*a = *b;
	*b = tmp;
}

void BabbleSort(int *a){
	for(int i=0;i<N;i++){
		for(int j=N-1;j>i;j--){
			if(a[j] >= a[j-1]){
				Swap(&a[j],&a[j-1]);
			}
		}
	}
}


int main(){

	int a[N];

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

		BabbleSort(a);

		for(int i=0;i<N;i++){
			printf("%d ",a[i]);
		}
		printf("\n");
	}
	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;
}