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 = " << i << endl;
    }

    
    
    
    return 0;
}

C++: #define _CRT_SECURE_NO_WARNINGS
#include <cstdio>
#include <iostream>
#include <vector>
#include <list>
#include <map>
#include<string>
#include <algorithm>
#include <functional>
#include <cmath>
using namespace std;
typedef vector <int> ivector;

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

	return 0;
}

C++: #include <iostream>
using namespace std;
int main(){
    int x,h1=0,h2=0,h3=0;
    for(int i=0;i<10;i++){
        cin >> x;
        if(h1<=x){
            h3 = h2;
            h2 = h1;
            h1 = x;
        }else if(h1>=x && x>=h2){
            h3 = h2;
            h2 = x;
        }else if(h2>=x && x>=h3){
            h3 = x;
        }
    }
    cout << h1 << endl << h2 << endl << h3 << endl;
    return 0;
}

C++: #include <iostream>

using namespace std;

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

return 0;
}

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

using namespace std;

int main(void){
	int count = 0;
	set<int, greater<int>> nums;
	for (int i=0; i<10; ++i){
		int num;
		cin >> num;
		if ((0<=num) && (num<=10000)){
			nums.insert(num);
			count++;
		}
	}
	set<int, greater<int>>::iterator it = nums.begin();
	int n = 0;
	while (it != nums.end() && (n<3)){
		cout << *it << endl;
		++it;
		++n;
	}

	return 0;
}

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

C++: #include <iostream>

void sort(int* a);

int main()
{
    int i,high[10];
    for(i = 0;i < 10;++i){
        std::cin >> high[i];
    }
    sort(&high[0]);
    std::cout << high[0];
    std::cout << high[1];
    std::cout << high[2];
}

void sort(int* a)
{
        int i,first = 0,secand = 0,third = 0;
        for(i = 0;i < 10;++i){
           if(first < *(a + i)){
               first = *(a + i);
           }else if(secand < *(a + i)){
               secand = *(a + i);
           }else if(third < *(a + i)){
               third = *(a + i);
           }
        }
        *a = first;
        *(a + 1) = secand;
        *(a + 2) = third;
}

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

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

int main(){
	int a1,a2,a3,in;
	a1=a2=a3=0;
	
	for(int i=0;i<10;i++){
		cin>>in;
		if(in>a1){
			a3=a2;
			a2=a1;
			a1=in;
		}else if(in>a2){
			a3=a2;
			a2=in;
		}else if(in>a3){
			a3=in;
		}
	}
	cout<<a1<<endl<<a2<<endl<<a3<<endl;
	return 0;
}

C++: #include <iostream>
#include <sstream>
#include <iomanip>
#include <algorithm>
#include <cmath>
#include <string>
#include <vector>
#include <list>
#include <queue>
#include <stack>
#include <set>
#include <map>
#include <bitset>
#include <numeric>
#include <climits>
#include <cfloat>
using namespace std;

int main()
{
    vector<int> a(10);
    for(int i=0; i<10; ++i)
        cin >> a[i];
    sort(a.rbegin(), a.rend());
    for(int i=0; i<3; ++i)
        cout << a[i] << endl;
}

C++: lis=[];

for i in range(10):
    h=int(input());
    lis.append(h);
    
for i in range(10):
    for j in range(i+1,10):
        if lis[i]<lis[j]:
            a=lis[i];
            lis[i]=lis[j];
            lis[j]=a;
            
for i in range(3):
    print(lis[i]);

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

int main(){
  using namespace std;
  set<int, greater<int> > mts{};
  for(int i = 0; i < 10; i++){
    int tmp = 0;
    scanf("%d", &tmp);
    mts.insert(tmp);
  }
  int count = 0;
  for(int const mt : mts){
    printf("%d\n", mt);
    if(++count >= 3) break;
  }
  return 0;
}

C++: #include<iostream>
#include<string>
#include<algorithm>
#include<map>
#include<set>
#include<utility>
#include<vector>
#include<cmath>
#include<cstring>
#include<cstdio>
#define loop(i,a,b) for(int i=a;i<b;i++) 
#define rep(i,a) loop(i,0,a)
#define rp(a) while(a--)
#define pb push_back
#define mp make_pair
#define all(in) in.begin(),in.end()
const double PI=acos(-1);
const double EPS=1e-10;
using namespace std;
typedef long long ll;
typedef vector<int> vi;
bool h[1000010]={false};
int main(){
	vector<int>in(10);
	rep(i,10)cin>>in[i];
	sort(all(in));
	cout<<in[9]<<endl;
	cout<<in[8]<<endl;
	cout<<in[7]<<endl;
	
}

C++: #include <cstdio>
int main(){
 int top3[3];
 int i,tmp,data;
 for(i=0;i<3;i++) top3[i]=0;
 for(i=0;i<10;i++){
  scanf("%d",&data);
  if (top3[2]>data) {} 
  else {
   top3[2]=data;
   if (top3[1]>data) {} 
   else {
    top3[2]=top3[1];
    if (top3[0]>data) top3[1]=data;
    else {
     top3[1]=top3[0];
     top3[0]=data;
    };
   };
  };
 };
 for(i=0;i<3;i++)
    printf("%d\n",top3[i]);
 return 0;
};

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

using namespace std;

int main() {
	vector<int> heights;
	int meter;

	for(int index = 0; index < 10; ++index) {
		cin >> meter;
		heights.push_back(meter);
	}
	
	reverse(heights.begin(), heights.end());
	
	cout << heights[0] << endl;
	cout << heights[1] << endl;
	cout << heights[2] << endl;
	
	return 0;
}

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

int main()
{
  std::vector<int> hills(10);
  for (int i = 0; i < 10; i++) {
    int temp;
    scanf("%d", &temp);
    hills[i] = temp;
  }
  std::sort(hills.begin(), hills.end());
  std::reverse(hills.begin(), hills.end());
  for (int i = 0; i < 3; i++) {
    printf("%d\n", hills[i]);
  }
  return 0;
}