Go: package main

import (
        "fmt"
        "sort"
)


func main() {
        var s []int
        var n int
        for i := 0; i < 5; i++ {
                fmt.Scanf("%d", &n)
                s = append(s, n)
        }
        sort.Ints(s)
        for i:= 1; i <= len(s); i++ {
                fmt.Printf("%d", s[len(s)-i])
                if i < len(s) {
                        fmt.Printf(" ")
                }
        }
        fmt.Printf("\n")
}

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

using namespace std;

typedef long long ll;
typedef unsigned long long ull;
typedef vector<int> vi;
typedef pair<int, int> ii;
typedef pair<ll, int> li;
typedef pair<int, ll> il;
typedef vector<ii> vii;
typedef vector<il> vil;
typedef vector<li> vli;

#define F first
#define S second
#define pb(x) push_back(x)
#define mp(a,b) make_pair(a,b)
#define sz size()
#define all(A)    A.begin(), A.end()
#define mem(a, b) memset(a, b, sizeof(a))
#define f0(i,b)   for(int i=0;i<(b);i++)
#define f1(i,b)   for(int i=1;i<=(b);i++)
#define f2(i,a,b) for(int i=(a);i<=(b);i++)
#define fr(i,b,a) for(int i=(b);i>=(a);i--)
#define rep(i,a,b,c) for(int i=(a);i!=(b);i+=(c))
#define mod 1000000007

#define forr(i,n)    for(i=0; i<n; i++)
#define whilee(i,t)  while(i!=t)
#define  sl(a)  scanf("%lld",&a)
#define  pl(a)  printf("%lld",a)

//for(auto it =A.begin(); it!=A.end(); it++)
//sort(A.begin(),A.end());
//binary_search(A.begin(),A.end(),x);
//reverse(A.begin(), A.end());
//cout << *max_element(A.begin(), A.end());
//cout << *min_element(A.begin(), A.end());
//count(A.begin(), A.end(), X); //counts the occurrences of X
//distance(A.begin(),A.end());  //distance between first to last element
//accumulate(A.begin(), A.end(), 0); //add
//next_permutation(A.begin(), A.end());
//prev_permutation(A.begin(), A.end());
//swap(S[0], T[0]);
//scanf("%d",&x);
//printf("%d\n",x);

vector <int> A;
//deque <int> A;
//queue <int> A;
//stack <int> A;
//set <int> A;
//map <int,int> A;
//pair <int,int> A ;
//vector <pair <int,int>> A ;
//char ch;
//string S, T, U;
ll i, j, k, a, b, c, d, f, g, h, l, m, n, p, q, r, s, t, w, x, y, z, maxx=INT_MIN, minn=INT_MAX, ans=0, sum=0, cnt=0;

int main()
{
    //ios_base::sync_with_stdio(false);
    //cin.tie(nullptr);
    //cout.tie(nullptr);

    forr(i,5)
    {
        cin>>x;
        A.pb(x);
    }
    sort(all(A),greater<>());
    forr(i,4)
    {
        cout<<A[i]<<" ";
    }
    cout<<A[4]<<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,greater<int>());
  cout<<a[0]<<" "<<a[1]<<" "<<a[2]<<" "<<a[3]<<" "<<a[4]<<endl;
  
  return 0;
}

C++: #include<iostream>

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

C++: #include<iostream>

using namespace std;

// バブルソートで使うスワップ
// ループの中に書きたくなかったので関数化。
void swap(int& l, int &r) {
	int temp = l;
	l = r;
	r = temp;
}

int main() {
	int temp[5];
	for (int& a : temp) {
		cin >> a;
	}
	// 数が少ないのでバブルソートを実装してみる
	for (int i = 0; i < 4; ++i) {
		for (int j = 1; j < 5; ++j) {
			if (temp[j - 1] < temp[j]) {
				swap(temp[j - 1], temp[j]);
			}
		}
	}

	for (int i = 0; i < 5; ++i) {
		cout << temp[i];
		if (i != 4) {
			cout << " ";
		}
		else {
			cout << 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>
using namespace std;
void bubble(int a[]);
int main(){
    int a[5];
    for(int i=0;i<5;i++)
        cin >> a[i];
    bubble(a);
    for(int i=0;i<4;i++)
        cout << a[i] << " " ;
    cout << a[4] << endl;
}

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

C++: #define _USE_MATH_DEFINES

#include <iostream>
#include <string>
#include <sstream>
#include <iomanip>
#include <cmath>
#include <algorithm>
#include <utility>
#include <vector>
#include <numeric>

using namespace std;

int main()
{
	vector<int> a(5);
	for (int i = 0; i < 5; i++)
	{
		cin >> a.at(i);
	}

	sort(a.begin(), a.end());
	reverse(a.begin(), a.end());

	for (int i = 0; i < 5; i++)
	{
		cout << a.at(i) << (i == 4 ? "" : " ");
	}

	cout << endl;
}

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