Go: package main

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

var rdr = bufio.NewReaderSize(os.Stdin, 1000000)

func readLine() string {
	buf := make([]byte, 0, 1000000)
	for {
		l, p, e := rdr.ReadLine()
		if e != nil {
			panic(e)
		}
		buf = append(buf, l...)
		if !p {
			break
		}
	}
	return string(buf)
}

func toInt(str string) int {
	n, _ := strconv.Atoi(str)
	return n
}

func main() {
	lst := make([]int, 0)
	for i := 0; i < 10; i++ {
		lst = append(lst, toInt(readLine()))
	}
	sort.Ints(lst)
	for i := 9; i > 6; i-- {
		fmt.Println(lst[i])
	}
}

C++: //http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=0001

#include <iostream>
#include <algorithm>
using namespace std;
int main() {
	int d[10] = { 0 };
	for (int i = 0; i < 10;i++) cin >> d[i];
	sort(d, d + 10);
	reverse(d, d + 10);
	cout << d[0] << endl << d[1] << endl << d[2] << endl;
}

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

int main(){

  int a[10],i=1;
  cin << i;
  while(cin >> a[i]){
    i++
  }
  sort(a,a+i);
  cout << a[i-1] << endl;
  cout << a[n-2] << endl;
  cout << a[i-3] << endl;

  return 0;
}

C++: #include<stdio.h>

int main(void)
{
	int high[10]={1819,2003,876,2840,1723,1673,3776,2848,1592,922};
	int x,max,time;


	for(time=1;time<=3;time++)
	{
		max=0;

		for(x=0;x<10;x++)
		{
			if(max<high[x])
			{
				max=high[x];
			}
		}
		for(x=0;x<10;x++)
		{
			if(max==high[x])
			{
				printf("%d\n",high[x]);
				high[x]=0;
			}
		}
	}

	return 0;
}

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

int main(){
	int mountain[10]={}, first=0, second=0, third=0;

	for(int i=0; i<10; i++){
		cin >> mountain[i];
		if(first <= mountain[i]){
			first = mountain[i];	
		}
		else if(mountain[i]<=first && mountain[i]>=second){
			second = mountain[i];
		}
		else if(mountain[i]<=second && mountain[i]>=third){
			third = mountain[i];
		}
	}
	cout << first << "\n" << second << "\n" << third << endl;

	return 0;
}

C++: num = []
i=0
while i < 10
      num[i] = gets.to_i
      i+=1
end

num.sort!{|a, b| (-1) * (a <=> b)}

puts "result"
for n in 0..2
    puts "#{num[n]}"
end

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

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

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

using namespace std;

int main(){

	vector<int> mountains;
	
	for(int i= 0 ; i<10 ; i++){
		int a;
		cin>>a;
		mountains.push_back(a);
	}

	for(int i=0 ; i<mountains.size()-1 ; i++){
		for(int j=0 ; j<mountains.size()-1 ; j++){
			if(mountains[j] < mountaians[j+1]){
				int tmp;
				
				tmp = mountains[j];
				mountains[j] = mountains[j+1];
				mountains[j+1] = tmp;
			}
		}
	}

	for(int i ; i<3 ; i++){
		cout<<mountains[i]<<endl;
	}

return 0;
}

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

int main(){
	int a[10];

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

	for(int i=9;i>6;i--){
		cout << a[i] << endl;
    }
    return 0;
}

C++: #include<cstdio>

int main()
{
    int i=0,j=0,a[10]={0},temp;
    for(i=0;i<=9;i++) scanf("%d",&a[i]);
    for(i=j;i<=9;i++)
    {
       for(j=0;j<=2;j++)
            if(a[i]>a[j])
            {
                temp=a[i];
                a[i]=a[j];
                a[j]=temp;
            }
    }
    printf("%d\n%d\n%d\n",a[0],a[1],a[2]);
    return 0;

}

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

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

C++: #include<iostream>
using namespace std;
int main()
{
int i,h,m1,m2,m3;
m1=0;
m2=0;
m3=0;
for(i=0;i<10;i++)
{
	cin>>h;
	if(h>m1)
	{
		m3=m2;
		m2=m1; 
		m1=h;
	}
	else if(h>m2)
	{
		m3=m2;
		m2=h;
	}
	else if(h>m3)
	{
		m3=h;
	}
}
cout<<m1<<endl;
cout<<m2<<endl;
cout<<m3<<endl;
return 0;
}

C++: #include <iostream>
 
using namespace std;
 
int main() {
 
        int height[10];
        
        for(int i=0;i<10;++i){
                cin >> height[i];
        }
 
        int temp;
        for(int i=0;i<10;++i){
                for(int j=0;j<i;++j){
                        if(height[i]>height[j]){
                                temp = height[j];
                                height[j] = height[i];
                                height[i] = temp;
                        }
                }
        }
 
        cout << height[0] << "\n";
        cout << height[1] << "\n";
        cout << height[2] << "\n";
        
        
        return 0;
}

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-1; i >= lineNum-3; i--)
    {
        cout << heights[i] << endl;
    }

    
}

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

int main(){
    int height[10];
    
    for(int i=0;i<10;i++){
        do{
            cin >> height[i];
        }while(height[i]<0 || height[i]>10000);
    }
    
    sort(height,height+10);
    
    for(int i=9;i>6;i--)
        cout << height[i]<<endl;
    
    return 0;
}

C++: #include<stdio.h>

int main(){
	int m[10],i,j,big;
	for(i=0;i<10;i++){
		scanf("%d",&m[i]);
	}
	for(i=0;i<10;i++){
		for(j=0;j<10;j++){
			if(m[i]>m[j]){
				big=m[i];
				m[i]=m[j];
				m[j]=big;
			}
		}
	}
	for(i=0;i<3;i++){
		printf("%d\n",m[i]);
	}
	return 0;
}

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

using namespace std;

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

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

int main(){

	int hill[]={0,0,0,0,0,0,0,0,0,0};

	for(int j=0;j<=9;j++){
		cin>>hill[j];
	}

	int key;
	int flag;

	//sort
	for(key=9;key>=0;key--){

		for(int i=0;i<=key;i++){
			if(hill[i]>hill[i+1]){
				flag=hill[i];hill[i]=hill[i+1];hill[i+1]=flag;
			}
		}

	}

	cout<<hill[9]<<"\n"<<hill[8]<<"\n"<<hill[7]<<endl;

	return 0;

}

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

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

C++: #include<iostream>

//関数の宣言
void sort(int mountain[10]);

int main(){
	
	const int a = 10;
	int mountain[a];
	
	for (int i = 0; i < 10; ++i){
		std::cin >> mountain[i];
	}
	sort(mountain);

	for (int i = 0; i < 3; i++){
		std::cout << mountain[i] << std::endl;
	}
	return 0;
}


//関数の定義
void sort(int mountain[10]){
	for (int i = 0; i < 9; ++i){
		for (int j =i+1; j < 10; ++j){
			if (mountain[i] < mountain[j]){
				int tmp = mountain[i];
				mountain[i] = mountain[j];
				mountain[j] = tmp;
			}
		}
	}
}