Go: package main

import (
	"bufio"
	"fmt"
	"os"
	"sort"
	"strconv"
)

func main() {
	scanner := bufio.NewScanner(os.Stdin)
	counter := 0
	var mountain []int
	for scanner.Scan() {
		i, err := strconv.Atoi(scanner.Text())
		if err != nil {
			break
		}
		mountain = append(mountain, i)
		counter++
		if counter == 10 {
			break
		}

	}
	sort.Ints(mountain)
	fmt.Println(mountain[9])
	fmt.Println(mountain[8])
	fmt.Println(mountain[7])
}

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

using namespace std;

const int numOfMountain = 10;

int main(int argc, char** argv){
    int mountainBuf;
    vector<int> mountains;

    for(int i = 0; i <= numOfMountain; i++) {
        mountainBuf = atoi(argv[i]);
        mountains.push_back(mountainBuf);
    }

    sort(mountains.begin(), mountains.end());

    auto out = mountains.end();
    for(int i = 0; i < 3; i++) {
        out--;
        cout << *out << endl;
    }

    return 0;
}

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

#define iota(i,n,b,s) for(int i=int(b);i!=int((b)+(s)*(n));i+=(s))
#define range(i,n,m) iota(i,(((n)>(m))?((n)-(m)+1):((m)-(n)+1)),(n),((n)>(m)?-1:1))
#define rep(i,n) iota(i,(n),0,1)

#define INF (1e9)
#define EPS (1e-9)
#define cons(a,b) (make_pair(a,b))
#define car(a) (a.first)
#define cdr(a) (a.second)
#define cadr(a) (car(cdr(a)))
#define cddr(a) (cdr(cdr(a)))
#define all(a) a.begin(), a.end()
#define trace(var) cerr<<">>> "<<#var<<" = "<<var<<endl;

typedef long long INTEGER;
typedef double FLOAT;

template<class S, class T>
ostream& operator<<(ostream& os, pair<S,T> p) {
  os << '(' << car(p) << ", " << cdr(p) << ')';
  return os;
}

template<class T>
ostream& operator<<(ostream& os, vector<T> v) {
  os << v[0];
  for (int i=1, len=v.size(); i<len; ++i) os << ' ' << v[i];
  return os;
}

void swap(int*a, int*b) {
  int t = *b;
  *b = *a;
  *a = t;
}

int main() {

  int hs[4];
  hs[3] = -1;

  rep (i, 10) {
    int h; cin >> h;
    if (i < 3) {
      hs[i] = h;
    } else {
      hs[3] = h;
      sort(hs, hs + 4);
      swap(hs, hs + 3);
      swap(hs + 1, hs + 2);
    }
  }

  rep (i, 3) {
    cout << hs[i] << endl;
  }

  return 0;
}

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

int main(){
int a[10],i=0;
for(;i<10;i++){
scanf("%d",&a[i]);
}
sort(a,a+10);
for(;i>6;i--){
printf("%d\n",a[i]);
}
return 0;
}

C++: #include<iostream>
#include<vector>
int main(){
	std::vector<int> vec(10);
	for(int i=0;i<10;i++){
		std::cin>>vec[i];
	}
	while(1){
		int a,b=0;
		for(int j=0;j<10;j++){
			if(vec[j]>vec[j+1]&&j+1<10){
				a=0;
				a=vec[j];
				vec[j]=vec[j+1];
				vec[j+1]=a;
				b++;
			}
		}
		if(b==0)break;
	}
	for(int i=0;i<3;i++){
		std::cout<<vec[i]<<std::endl;
	}
	return 0;
}

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

int main(void)
{
	vector<int> v(10);
	for(int i = 0; i < 10; i++)
		cin >> v[i];
	sort(v.begin(), v.end());

	for(int i = 9; i >= 7; i--)
		cout << v[i] << endl;

	return 0;
}

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

void cswap(int &x, int &y)
{
    int tmp = x;
    x = y;
    y = tmp;
}

int main(void){

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

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

	max1 = a[1];

	for (i=2; i<11; i++){
		if (max1 < a[i]){
			cswap(max1,a[i]);
		}
	}
	max2 = a[2];

	for (i=3; i<11; i++){
		if (max2 < a[i]){
			cswap(max2,a[i]);
		}
	}
	max3 = a[3];

	for (i=4; i<11; i++){
		if (max3 < a[i]){
			cswap(max3,a[i]);
		}
	}


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

return 0;
	}

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

int main() {
	ios_base::sync_with_stdio( false );

	vector<int> mts( 10 );
	for( auto& v: mts ) { cin >> v; }

	sort( mts.begin(), mts.end(), greater<>() );

	for( int i = 0; i < 3; ++i ) {
		cout << mts[i] << endl;
	}
}

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

//using namespace--------------------------------------------------------------------------------------------------------------
using namespace std;

//define-----------------------------------------------------------------------------------------------------------------------
#define rep(i, n) for(int i = 0; i < (int)n; i++)
#define FOR(i, s, n) for(int i = s; i < (int)n; i++)
#define per(i, n) for(int i = n; i >= 0; i--)
#define ROF(i, s, n) for(int i = s; i >= (int)n; i--)
#define FORIT(i, A) for (auto i : A)
#define PRINT(x) cout << (x) << "\n"
#define ALL(a) (a).begin(),(a).end()
#define RALL(a) (a).rbegin(), (a).rend()
#define PB push_back
#define MP make_pair
#define EACH(i, n) for (__typeof((n).begin()) i = (n).begin(); i != (n).end(); ++i)
#define SZ(a) int((a).size())
#define EXIST(s,e) ((s).find(e)!=(s).end())
#define SORT(c) sort((c).begin(),(c).end())
#define INF 1 << 25
#define CLR(a) memset((a), 0 ,sizeof(a))
#define dump(x) cerr << #x << " = " << (x) << "\n";
#define debug(x) cerr << #x << " = " << (x) << " (L" << __LINE__ << ")" << " " << __FILE__ << "\n";
#define sq(n) (n) * (n)

//typedef----------------------------------------------------------------------------------------------------------------------
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector<string> VS;
typedef pair<int, int> PII;
typedef long long LL;
typedef unsigned int uint;
typedef unsigned long long ull;

//const------------------------------------------------------------------------------------------------------------------------
const double EPS = 1e-10;
const double PI = acos( -1.0 );

//global-----------------------------------------------------------------------------------------------------------------------
vector<int> a(10);

//function---------------------------------------------------------------------------------------------------------------------
int main() {
	rep( i, 10 ) {
		scanf( "%d", &a[ i ] );
	}
	sort( a.begin(), a.end() );
	ROF( i, 9, 7 ) {
		printf( "%d\n", a[ i ] );
	}
	return 0;
}

C++: #include<stdio.h>
int main()
{
    long long array1[11],array2[11],i,j,n,k=0,temp,l,p=0;

    scanf("%lld",&n);

        for(i=0; i<n; i++)
        {
            scanf("%lld",&array1[i]);
        }
        for(i=0; i<n-1; i++)
        {
            for(j=i+1; j<n; j++)
            {
                if(array1[i]>array1[j])
                {
                    temp=array1[i];
                    array1[i]=array1[j];
                    array1[j]=temp;
                }
            }
        }
l=0;
for(k=n-1;k>=0;k--){

        array2[l]=array1[k];
            l++;
}

for(p=0;p<3;p++){
    printf("%lld\n",array2[p]);
}
    return 0;
}

C++: #include <iostream>
#include <algorithm>
int main() {
  int data[10];
  for (int i = 0; i < 10; i++) {
    std::cin >> data[i];
  }
  std::sort(data,data+10,std::greater<int>());
  for (int i = 0; i < 3; i++) {
    std::cout << data[i] << std::endl;
  }
}

C++: //
//  main.cpp
//  ListOfHeights
//
//  Created by James Hosken on 28/09/2014.
//  Copyright (c) 2014 James Hosken. All rights reserved.
//

#include <iostream>
#include <stdlib.h>
#include <algorithm>
using namespace std;

int main(int argc, const char * argv[])
{
    
    string input_line;
    
    int *heights;
    heights = new int[0];
    int lineNum = 0;
    
    
    while(cin){
        getline(cin, input_line);
        lineNum++;
        
        //Chunk of array expansion code
        int line = atoi(input_line.c_str());
        int* temp = new int[lineNum];
        copy(heights, heights + lineNum-1, temp);
        delete [] heights;
        temp[lineNum-1] = line;
        heights = temp;
        
        
    }
    sort(heights, heights + lineNum);
    
    for(int i = lineNum; i < lineNum-3; i--){
        cout << heights[i] << " & I = " << i << endl;
    }

    
    
    
    return 0;
}