Go: package main

import (
	"fmt"
	"sort"
)

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

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

	sort.Ints(mt)
	fmt.Printf("%d\n%d\n%d\n", mt[9], mt[8], mt[7])

}

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

using namespace std;

int main(void)
{
  int height;
  vector<int> mountain;

  for(int i=0;i<10;i++)
    {
      cin >> height;
      mountain.push_back(height);
    }

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

  for(int i=0;i<3;i++)
    cout << mountain[i] <<endl;

  return 0;

}

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

using namespace std;

int main()
{
  vector<int> height;
  int i = 0, n;
  while (scanf(" %d ", &n) == 1) {height.push_back(-n);}
  sort(height.begin(), height.end());
  for (i = 0; i < 3; i++) {
    printf("%d\n", -1 * height[i]);
  }
  return 0;
}

C++: #include<bits/stdc++.h>
using namespace std;

int main(){
  int h[10];
  int i;
  for(i=0;i<10;i++){
    cin>>h[i];
  }

  sort(h, h+10, greater<int>());

  cout<<h[0]<<h[1]<<h[2];

  return 0;
}

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

int main(){

int i,j,h,temp;
int m[10];



//入力
for(i=0; i<10; i++){
   cout << "height of mountain " << i+1 << "(0 <= height of mountain <= 10000):";
   cin >> h;

   if(h >= 0 and h <= 10000){
       m[i]=h;
   }else{
   cout << "0 <= height of mountain <= 10000を満たしておりません。もう一度入力してください。\n";
   i--;
   }
}



//ソート
    for (i = 0; i < 9; i++) {
        for (j = 9; j > i; j--) {
            if (m[j - 1] > m[j]) {  
                temp = m[j];  
                m[j] = m[j - 1];
                m[j - 1] = temp;
            }
        }
    }
    
    
//出力
cout << "result\n";
for (i = 9; i > 6; i--) {
   cout << m[i] << "\n";
}

    return 0;
}

C++: #include<iostream>
using namespace std;
int main() {
	int yama[9];
	int x,y,z,a;
	for(x=0; x<10; x++) {
		cin >> yama[x];
	}
	for(y=0;y<10000; y++) {
		if(yama[y] > yama[y+1]) {
			z = yama[y];
			yama[y] = yama[y+1];
			yama[y+1] = z;
		}
		else {
			a++;
		}
		if(y == 8) {
			if(a == 9) {
				break;
			}
			else {
				y = 0;
				a = 0;
			}
		}
	}
	cout << yama[9] << endl;
	cout << yama[8] << endl;
	cout << yama[7] << endl;
	return 0;
}

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

int main(){
	int array[10];
	int num1=0,num2=0,num3=0;
	for(int i=0;i<10;i++){
		cin >> array[i];
		if(array[i]>num1){
			num3 = num2;
			num2 = num1;
			num1 = array[i];
			continue;
		}
		if(array[i]>num2){
			num3=num2;
			num2=array[i];
			continue;
		}
		if(array[i]>num3){
			num3=array[i];
			continue;
		}
	}

	cout << num1 << endl
		<< num2 << endl
		<< num3 << endl;
	return 0;
}

C++: #include <stdio.h>
#include <stdlib.h>
#include <iostream>
#include <vector>
#include <string>
#include <queue>
#include <algorithm>
#include <math.h>
#include <utility>
#include <set>
#include <map>
#define INF 100000
using namespace std;

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

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

int main(){

	int a[11],max1,max2,max3;

	for (int i=0; i<10; i++){
		while (true){ 
		cout << "山の高さ" << i+1 << "（整数）" ;			
		cin >> a[i];
		if ((cin.good() == 1) && (a[i] >= 0) && (a[i] <= 10000)) {
			break;
		}
		}	
	}

	max1 = a[0];

	for (i=1; i<10; i++){
		if (max1 < a[i]){
			swap (max1,a[i]);
		}
	}
	max2 = a[1];

	for (i=2; i<10; i++){
		if (max2 < a[i]){
			swap (max2,a[i]);
		}
	}
	max3 = a[2];

	for (i=3; i<10; i++){
		if (max3 < a[i]){
			swap (max3,a[i]);
		}
	}


		cout << max1 << endl;
		cout << max2 << endl;
		cout << max3 << endl;
		

return 0;
	}

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

int main(){
  std::vector<int> a;
  for(int i=0;i<10;i++){
    int tmp;
    std::cin >> tmp;
    a.push_back(tmp);
  }
  std::sort(a.begin(), a.end());
  for(auto i=a.rbegin();i!=a.rbegin()+3;i++){
    std::cout << *i << std::endl;
  }
  return 0;
}

C++: #include <iostream>
#include <algorithm>
using namespace std;
int a[15];

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

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

int main()
{
    int heights[10];
    for(int i=0;i<10;i++)
    {
        cin>>heights[i];
    }
    sort(0,9);
    cout<<"height of 1st mountain "<<heights[9]<<endl;
    cout<<"height of 2nd mountain "<<heights[8]<<endl;
    cout<<"height of 3rd mountain "<<heights[7]<<endl;
    
    
}

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

using namespace std;

typedef long long int ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;

const int INF = 1000000000;
const ll LINF = (ll) 4000000000000000000;
const ll MOD = (ll) 1000000007;
const double PI = acos(1.0);
const int limit = 100010;

#define REP(i,m,n) for(ll i = m; i < (ll)(n); i++)
#define rep(i,n) REP(i, 0, n)
#define MP make_pair
#define YES(n) cout << ((n) ? "YES" : "NO") << endl
#define Yes(n) cout << ((n) ? "Yes" : "No") << endl
#define Possible(n) cout << ((n) ? "Possible" : "Impossible") << endl
#define NP(v) next_permutation(v.begin(),v.end())
#define smaller_queue  priority_queue <ll, vector<ll>, greater<ll> >
//------------------------------------------------------

int main() {
    int h[10];
    rep(i, 10) cin >> h[i];
    sort(h, h + 10);
    reverse(h, h + 10);
    rep(i, 3) cout << h[i] << endl;

    return 0;
}

C++: #include <iostream>

using namespace std;
int data[11];
int temp;
int main()
{
    cout << "Input 10 Data(value = 1-10000): " << endl;
    for(int a = 0;a<10;a++)
    {
        cin >> data[a];
    }

    for(int x=0;x<10;x++)
    {
        for(int y=0;y<10;y++)
        {
            if(data[y]<data[y+1])
            {
                temp = data[y];
                data[y] = data[y+1];
                data[y+1] = temp;
            }
        }
    }
    cout << data[0] << endl;
    cout << data[1] << endl;
    cout << data[2] << endl;
}

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

int main(){
	vector<int> v(10);
	for(int i = 0 ; i < 10 ; i++) cin >> v[i];
	sort(v.begin(),v.end());
	for(int i = 0 ; i < 3 ; i++)
		cout << v[v.size()-1-i] << endl;
}

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

using namespace std;

int main(){

 int i, height[10];
 for(i=0;i<10;i++){
  scanf("%d", &height[i]);
 }
 sort(height, height+10, greater<int>());

 for(i=0;i<2;i++){
  printf("%d\n", height[i]);
 }

 return 0;
}

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

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

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

using namespace std;

int main() {
	int T,i,j,a[11];

	for(i=1;i<11;i++)
    {
        scanf("%d",&a[i]);
    }
    for(i=1;i<11;i++)
    {
        for(j=1;j<11;j++)
        {
            if(a[i]>a[j])
            {
                T=a[i];
                a[i]=a[j];
                a[j]=T;
            }

        }
    }
    for(i=1;i<4;i++)
    {
        printf("%d\n",a[i]);
    }

	return 0;
}