Go: package main

import (
	"fmt"
	"sort"
)

func main() {
	mountains := make([]int, 10, 10)

	for i := 0; i < 10; i++ {
		fmt.Scan(&mountains[i])
	}

	sort.Sort(sort.Reverse(sort.IntSlice(mountains)))

	for i := 0; i < 3; i++ {
		fmt.Println(mountains[i])
	}
}

C++: #include<stdio.h>
    
int main(void){
    
    /* 宣言と初期化 */
    int hai[10];
    int i;
    int temp2nd;
    int temp3rd;
    int tempmax;
    
for(i=0;i<10;i++)
{
scanf("%d",&hai[i]);
}
    /* 代入 */
    temp2nd=hai[0];
    tempmax=hai[0];
    temp3rd=hai[0];
    
    /* 計算 */
    for(i=0;i<10;i++){
        /* 最大値求める */
        if(hai[i]>tempmax)
       { tempmax=hai[i];
　　    hai[i]=0;}
    }
    
    for(i=0;i<10;i++){
        /*2番目求める */
        if(hai[i]<tempmax&&hai[i]>temp2nd)
        {temp2nd=hai[i];hai[i]=0}
    }
    
    for(i=0;i<10;i++){
        /* 3番目求める */
        if(hai[i]>temp3rd&&hai[i]<temp2nd)
        {temp3rd=hai[i];hai[i]=0}
    }
    
    /* 表示 */
    printf("最も高い山の高さ　%d\n",tempmax);
    printf("２番目に高い山の高さ　%d\n",temp2nd);
    printf("３番目に高い山の高さ　%d\n",temp3rd);
    
    return 0;
}

C++: #include<bits/stdc++.h>
using namespace std;
int main(){
  int mountain[10];
  for(int i=0;i<10;i++)cin>>mountain[i];
  sort(mountain,mountain+10);
  for(int i=9;i>=7;i--)cout<<mountain[i]<<endl;
  return 0;
}

C++: #include <iostream>
using namespace std;
int main() {
int a[10];
int b;
for(int i=0;i<10;i++){
cin>>b;
a[i]=b;
}
sort(a,a+10,greater<int>());
cout<<a[0]<<endl;
cout<<a[1]<<endl;
cout<<a[2]<<endl;
return 0;
}

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

int main(){
  int i,x;
  std::vector<int>v;
  for(i=0;i<10;i++)scanf("%d",&x),v.push_back(x);
  std::sort(v.begin(),v.end());
  printf("%d\n%d\n%d\n",v[9],v[8],v[7]);
}

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

using namespace std;

int main() {
	int mountain[10] = { 0 },i;
	for (i = 0; i < 10; i++) {
		cin >> mountain[i];
	}
	sort(mountain, mountain + 10);
	for (i = 0; i < 3; i++) {
		cout << mountain[9 - i] << endl;
	}
	return 0;
}

C++: #include <iostream>
#include <cstdio>
#include <algorithm>
using namespace std;
#define REP0(i,n) for(int i=0;i<n;++i)
#define REP1(i,n) for(int i=1;i<=n;++i)
#define ALL(c) (c).begin(),(c).end()
int main(){
	int a[10];
	REP0(i,10) scanf("%d",&a[i]);
	sort(a,a+10);
	printf("%d\n%d\n%d\n",a[9],a[8],a[7]);
	return 0;
}

C++: #include <iostream>
#include <array>
#include <algorithm>
 
int main(void) {
    std::array<u_int, 10> heights;
	
    for (u_int i = 0; i < 10; ++i) {
        std::cin >> heights[i];
    }
	
    std::sort(heights.begin(), heights.end(), std::greater<u_int>());
	
    for (u_int i = 0; i < 3; ++i) {
        std::cout << heights[i] << std::endl;
    }
    return 0;
}

C++: #include<iostream>#include<algorithm>#include<vector>using namespace std;
int main(){vector<int> a(10);int i=0;for(;i++<10;)cin>>a[i];sort(a.begin(),a.end());cout<<a[9]<<"\n"<<a[8]<<"\n"<<a[7]<<endl;}

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

using namespace std;

vector< int > adj;

int main()
{
    for(int i = 1; i <= 10; i++){
        int x;
        cin>> x;
        adj.push_back(x);
    }
    sort(adj.begin(), adj.end());
    cout<< adj[9] <<'\n' << adj[8] <<'\n' << adj[7];
}

C++: //-------------
//include
//-------------
#include <map>
#include <list>
#include <cmath>
#include <vector>
#include <string>
#include <cctype>
#include <cstdlib>
#include <iostream>
#include <algorithm>
using namespace std;
//-------------
//typedef
//-------------
typedef long long LL;
typedef  vector<int> VI;
typedef  pair<int, int> PII;
typedef  vector<int, int> VII;
typedef  map<string, int> MSI;
//-------------
//utillty
//-------------
#define ALL(a)  (a).begin(),(a).end()
#define MK make_pair
#define PB push_back
#define SZ(a) int((a).size())
#define EACH(i,c) for(typeof((c).begin()) i=(c).begin(); i!=(c).end(); ++i)
#define EXIST(s,e) ((s).find(e)!=(s).end())
#define SORT(c) sort((c).begin(),(c).end())
#define COUT(a) cout<<a<<endl
//-------------
//repetition
//-------------
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define REP(i,n)  FOR(i,0,n)
//-------------
//debug
//-------------
#define dump(x)  cerr << #x << " = " << (x) << endl;
#define dumpl(c) REP(i,SZ(c))cerr<<#c<<i<<"="<<(c[i])<<endl;
#define debug(x) cerr << #x << " = " << (x) << " (L" << __LINE__ << ")" << " " << __FILE__ << endl;

const int MOD = 1000000007;
int main()
{
	VI hill;
	REP(i, 10)
	{
		int temp;
		cin >> temp;
		hill.push_back(temp);
	}
	SORT(hill);
	COUT(hill[9]);
	COUT(hill[8]);
	COUT(hill[7]);
#ifdef _DEBUG
	while(1);
#endif // _DEBUG

	return 0;
}

C++: 
#include <iostream>
#include <iomanip>
#include <algorithm>
#include <string>
#include <vector>
#include <set>
#include <map>
#define pi 3.14159265358979323846264338
using namespace std;

int main() {
	vector<int> yama;
	int j;
	for (int i = 0; i < 10; i++) {
		cin >> j;
		yama.emplace_back(j);
	}
	sort(yama.begin(), yama.end());
	for (int i = 0; i < 3; i++) {
		cout << yama[9 - i] << endl;
	}
	return 0;
}

C++: #include <stdio.h>
#include <stdlib.h>

int main()
{
    long values[10];
    char buf[255];

    for (int i = 0; i < 10; i++)
    {
        fgets(buf, 255, stdin);
        values[i] = strtol(buf, NULL, 10);
    }

    for (int i = 0; i < 3; i++)
    {
        int idx = -1;
        long val = -1;
        for (int j = 0; j < 10; j++)
        {
            if (val < values[j])
            {
                idx = j;
                val = values[j];
            }
        }
        printf("%ld\n", val);
        values[idx] = -1;
    }

    return 0;
}

C++: #include<iostream>
using namespace std;
int main(){
	int A,a=0,b=0,c=0;
	for (int i = 0; i < 10; i++){
		cin >> A;
		if (a < A){
			c = b;
			b = a;
			a = A;
		}
		else if (b < A){
			c = b;
			b = A;
		}
		else if (c < A){
			c = A;
		}
	}
	cout << a << endl << b << endl << c << endl;
	return 0;
}

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

int main()
{
	int a[10];
	int data_size = sizeof(a) / sizeof(a[0]) - 1;
	for (int i=0;i<=data_size;i++)
		cin >> a[i];
	sort(a,a+sizeof(a) / sizeof(a[0]));
	for (int j=0;j<=3-1;j++)
		cout << a[data_size-j] << endl;
	return 0;
}

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

int main(){
  int tall[10],no1=0,no2=0,no3=0,i;
  for(i=0;i<=9;i++){
    cin>>tall[i];
  }
  for(i=0;i<=9;i++){
    if(tall[i]>=no1){
      no3=no2;
      no2=no1;
      no1=tall[i];
    }
    if(tall[i]>=no2&&tall[i]<no1){
      no3=no2;
      no2=tall[i];
    }
    if(tall[i]>=no3&&tall[i]<no2){
      no3=tall[i];
    }
  }
  cout<<no1<<endl<<no2<<endl<<no3<<endl;

  return 0;
}

C++: #include <iostream>
#include <vector>
#include <string>
#include <fstream>
#include <list>
#include <cmath>
#include <fstream>
#include <queue>
#include <sstream>
#include <algorithm>
#include <cstring>
using namespace std;
emplate <class T> void change(T &a, T &b)// 交&#25442;
{
	T temp;
	temp = a;
	a = b;
	b = temp;
}
template <class T> void quicksort(vector<T> &S,int a,int b) // 快速排序
{
     int x = a;
	 int y = b;
	 T mid = S[(a+b)>>1];
     while (x <= y)
     {
           while (S[x] < mid) x++;
           while (S[y] > mid) y--;
           if (x <= y)
           {
              change(S[x], S[y]);
              x++;
              y--;
           }
     }
     if (x < b) quicksort(S, x, b);
     if (y > a) quicksort(S, a, y);
}
vector<int> vi;
int main()
{
	vi.resize(10);
	for(int i = 0; i < 10; i++)
		cin >> vi[i];
	quicksort(vi,0,9);
	cout << vi[9] << endl;
	cout << vi[8] << endl;
	cout << vi[7] << endl;
	return 0;
}

C++: #include <stdio.h>
int A[10],i,j,p;
int main(){
  for(i=0;i<10;i++){
    scanf(" %d",&A[i]);
  }
  for(i=0;i<10;i++){
    for(j=i+1;j<10;j++){
      if(A[i]>A[j]){
        p=A[j];
        A[j]=A[i];
        A[i]=p;
      }
    }
  }
  for(i=9;i>6;i--){
    printf("%d\n",A[i]);
  }
  return 0;
}