Go: package main

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

func main() {
        fp := os.Stdin
        scanner := bufio.NewScanner(fp)
        var lst [3]int

        for scanner.Scan() {
                num, _ := strconv.Atoi(scanner.Text())
                if lst[0] < num {
                        lst[2] = lst[1]
                        lst[1] = lst[0]
                        lst[0] = num
                } else if lst[1] < num {
                        lst[2] = lst[1]
                        lst[1] = num
                } else if lst[2] < num {
                        lst[2] = num
                }
        }

        for _, i := range lst {
                fmt.Printf("%d\n", i)
        }
}

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 << endl;
    }

    
    
    
    return 0;
}

C++: #include<iostream>
#include<string>
#include<algorithm>
using namespace std;
     
int main(){
  int a[9];
  for(int i=0;i<=9;i++){
    cin>>a[i];
  }
  sort(a,a+9);
  cout<<a[9]<<endl<<a[8]<<endl<<a[7]<<endl;
  return 0;
}

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

using namespace std;

int mountain[10];

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

C++: #include<cstdio>
#include<cstring>

int main(){
    int n[10],a;
    for (int f=0;f<10;f++){
        scanf("%d",&n[f]);
    }
    for(int f1=0;f1<10;f1++){
        for(int f2=0;f2<10;f2++){
            a=max(a,max(n[f1],n[f2]));
           }
      }
    printf("%d",a);
    return 0;
}

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

int main(){
  int a[3]={};
  for(int i=0;i<10;i++){
    int temp;
    cin>>temp;
    for(int j=0;j<3;j++){
      if(a[j]<temp&&j!=2){
	a[j+1]=a[j];
	a[j]=temp;
	break;
      }
    }
  }
  for(int i=0;i<3;i++){
    cout<<a[i]<<endl;
    }
  return 0;
}

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

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

int main() {
  vector<int> hills;
  for (int i = 0; i < 10; i++) {
    int x;
    cin >> x;
    hills.push_back(x);
  }
  std::sort(hills.begin(), hills.end(), std::greater<int>());
  for (int i = 0; i < 3; i++) {
    cout << hills[i] << endl;
  }
  return 0;
}

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

int main() {
  int mt[10];

  for(int i=0;i<10;i++) cin >> mt[i];

  sort(mt,mt+10);

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

  return 0;

}

C++: #include <iostream>
#include <string>
#include <cstring>
#include <fstream>
#include <algorithm>
#include <iomanip>
#include <vector>
#include <stack>
#include <queue>
#include <deque>
#include <map>
#include <list>
#include <set>
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <bitset>
#include <functional>

using namespace std;

#define FOR(i,n) 		for(int(i)=0;(i)<(int)(n);(i)++)
#define FORN(i,a,b,c) 	for(int(i)=a;i<(int)(b);i+=(c))
#define RES(x,nilai)	memset(x,nilai,sizeof(x));
#define pb              push_back
#define mp              make_pair
#define INF				1000000000

typedef long long ll;
typedef pair<int, int> ii;
typedef vector<int> vi;
typedef vector<ii> vii;

inline string IS(int a){
    char x[100];
    sprintf(x,"%d",a); string s = x;
    return s;
}

inline int SI(string a){
    char x[100]; int res;
    strcpy(x,a.c_str()); sscanf(x,"%d",&res);
    return res;
}

//==============================================

bool cmp(int x,int y) {return x>y;}

int arr[100];

int main() {
	//freopen("in.txt","r",stdin);
	//freopen("13.txt","w",stdout);
	ios_base::sync_with_stdio(false); cin.tie(NULL);
	
	for(int i =0 ;i < 10; i++) cin >> arr[i];
	sort(arr,arr+10)
	cout << arr[9] << endl << arr[8] << endl << arr[7] << endl;
		
    return 0;
}

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

C++: #include <iostream>

using namespace std;

static const int ARRAY_NUM = 10;

class sort{
private:
	int tmp;
public:
	int* bable(int a[]);
};

int* sort::bable(int a[]){
	for(int i=0;i<ARRAY_NUM;++i){
		for(int j=ARRAY_NUM-1;j>i;--j){
			if(a[j]>a[j-1]){
				tmp    = a[j-1];
				a[j-1] = a[j];
				a[j]   = tmp;
			}
		}
	}
	return a;
}

int main(void){

	//int *array = new int [5];
	sort sort;
	int hgt_mt[10];
	int* hgt_max;

	cout << "input height of mountain" << endl;

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

	hgt_max = sort.bable(hgt_mt);

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

	return 0;
}

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

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

int main(){
	int i=0;
	int m[10];
	for(i=0;i<10;i++)
	{
		cin>>m[i];
		while(0>m[i]||m[i]>10000)
			cin>>m[i];

	}
	
  sort(m[0], m[9], greater<int>());
	
	cout<<m[0]<<endl<<m[1]<<endl<<m[2]<<endl;

    return 0;
}

C++: #include<stdio.h>

int main(){
	int a1 = 0, a2 = 0, a3 = 0;

	int x;
	for(int i = 0; i < 10; i++){
		scanf("%d", &x);
		if(x > a3){
			a3 = x;
		}
		if(x > a2){
			a3 = a2;
			a2 = x;
		}
		if(x > a1){
			a3 = a2;
			a2 = a1;
			a1 = x;
		}
	}

	printf("%d\n%d\n%d\n", a1, a2, a3);

	return 0;
}

C++: #include<iostream>
#include<iomanip>
#include<algorithm>
#include<cmath>
#include<cstring>
#include<stack>
#include<cstdio>
#include<queue>
#define PI 3.1415927
using namespace std;
int main() {
	int h[11];
	for (int i = 0; i < 10; i++) {
		cin >> h[i];
	}
	sort(h, h + 10);
	for (int i = 0; i < 3; i++) {
		cout << h[i] << endl;
	}
}

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

using namespace std;

int main(){
  vector<int> vi;
  for(int i=0;i<10;i++){
    int buf;
    cin >> buf;
    vi.push_back(buf);
  }

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

  for(int i=1;i<=3;i++){
    cout<< vi[vi.size()-i] << endl;
  }
}

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

int main(){
	const int N = 10;
	
	int mountain[N];

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

	int _1st = 0;
	int _2nd = 0;
	int _3rd = 0;

	for (int i = 0; i < N; i++){
		if (mountain[i]>_1st){
			_3rd = _2nd;
			_2nd = _1st;
			_1st = mountain[i];
		}
		else if (mountain[i] > _2nd){
			_3rd = _2nd;
			_2nd = mountain[i];
		}
		else if (mountain[i] > _3rd){
			_3rd = mountain[i];
		}
	}
	cout << _1st << endl;
	cout << _2nd << endl;
	cout << _3rd << endl;

	return 0;
}

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

using namespace std;

int main(){

	int A[10];

	cin >> A[0] >> A[1] >> A[2] >> A[3] >> A[4] >> A[5] >> A[6] >> A[7] >> A[8] >> A[9];


	sort(A, A+10);

	cout << A[0] << endl;
	cout << A[1] << endl;
	cout << A[2] << endl;
}