Go: package main

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

var sc = bufio.NewScanner(os.Stdin)

func main() {
	heights := make([]int, 10)
	for i := 0; i < 10; i++ {
		sc.Scan()
		heights[i], _ = strconv.Atoi(sc.Text())
	}

	sort.Sort(sort.Reverse(sort.IntSlice(heights)))
	for i := 0; i < 3; i++ {
		fmt.Println(heights[i])
	}
}

C++: #include <iostream>
#include <array>
#include <utility>

template<class T>
T input()
{
	T val;
	std::cin >> val;
	return val;
}

int main()
{
	std::array<int, 10> high;
	for (int i = 0; i < 10; ++i)
		high[i] = input<int>();

	std::sort(high.begin(), high.end());

	std::cout << high[9] << " " << high[8] << " " << high[7] << std::endl;
}

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

using namespace std;

void Top3Mountains(int m1,int m2,int m3,int m4,int m5,int m6,int m7,int m8,int m9, int m10)
{
			deque<int> mountains;
			if ( m1 >= 0 && m1 <= 10000 )mountains.push_back(m1);
			if ( m2 >= 0 && m2 <= 10000 )mountains.push_back(m2);
			if ( m3 >= 0 && m3 <= 10000 )mountains.push_back(m3);
			if ( m4 >= 0 && m4 <= 10000 )mountains.push_back(m4);
			if ( m5 >= 0 && m5 <= 10000 )mountains.push_back(m5);
			if ( m6 >= 0 && m6 <= 10000 )mountains.push_back(m6);
			if ( m7 >= 0 && m7 <= 10000 )mountains.push_back(m7);
			if ( m8 >= 0 && m8 <= 10000 )mountains.push_back(m8);
			if ( m9 >= 0 && m9 <= 10000 )mountains.push_back(m9);
			if ( m10 >= 0 && 10 <= 10000 )mountains.push_back(m10);

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

			deque<int>::iterator it = mountains.begin();

			int i=0;
			for(i=0;i<3; i++){
				cout << *it << endl;
				it++;
			}
	
}

int main()
{

	Top3Mountains(1819,2003,876,2840,1723,1673,3776,2848,1592,922);
	return 0;
}

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

void BSort(int a[],int n);

int main () {

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

void BSort(int a[],int n){
	int temp;
	for(int i=0;i<n-1;i++){
		for(int j=n-1;j>i;j--){
			if(a[j-1]>a[j]){
				temp=a[j];
				a[j]=a[j-1];
				a[j-1]=temp;
			}
		}
	}
}

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

int main() {
    ios::sync_with_stdio(false);
    cin.tie(0);
    
    vector<int> v;
    int n;
    for(int i=0; i<10; i++) {
        cin >> n;
        v.push_back(n);
    }
    sort(v.begin(), v.end());
    cout << v[9] << endl;
    cout << v[8] << endl;
    cout << v[7] << endl;
    
    return 0;
}

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

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

C++: #include <iostream>
using namespace std;
int main(){
int a[] = {1819
,2003
,876
,2840
,1723
,1673
,3776
,2848
,1592
,922};
int ma=0, aa = 0;

for(int j=0;j<3;j++){
for(int i=0;i<10;i++){
if(ma > a[i])
ma = a[i];
aa = i;
}
cout << ma << endl;
a[a] = 0;
}

return 0;
}

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

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

	for(int i=0;i<10;i++) {
		cin >> mountains[i];
		if(mountains[i]>first) {
			third = second;
			second = first;
			first = mountains[i];
		}
		else if(mountains[i]>second) {
			third = second;
			second = mountains[i];
		}
		else if(mountains[i]>third)
			third = mountains[i];
	}

	cout << first << endl << second << endl << third << endl;

	return 0;
}

C++: #include<algorithm>
#include<cstdio>
int a[10];
int main(){
	for(int i=0;i<10;i++)scanf("%i",&a[i]);
	std::sort(a,a+10);
	printf("%i\n%i\n%i\n",a[9],a[8],a[7]);
	return 0; 
}

C++: // 2011/05/26 Tazoe

#include <iostream>
using namespace std;

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

	for(int i=0; i<9; i++)
		for(int j=i+1; j<10; j++)
			if(mnt[i]<mnt[j]){
				int tmp = mnt[i];
				mnt[i] = mnt[j];
				mnt[j] = tmp;
			}

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

	return 0;
}

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

int main(){
	int n[100]={0};
	int h1=0, h2=0, h3=0;
	for(int i=0; i<10; i++) cin >> n[i];

	for(int i=0; i<10; i++){
		if( h1<n[i] ){
			h3=h2;
			h2=h1;
			h1=n[i];
		}else if( h2<n[i] ){
			h3=h2;
			h2=n[i];
		}else if( h3<n[i] ){
			h3=n[i];
		}
	}
	cout << h1 << "\n";
	cout << h2 << "\n";
	cout << h3 << "\n";
}

C++: #include <iostream>

using namespace std;

void reverse(int *array, int length) {
	int i;
	int j;
	for(i=0;i<length-1;i++){
		for(j=i+1;j<length;j++){
			if(array[i]<array[j]){
				int temp=array[i];
				array[i]=array[j];
				array[j]=temp;
			}
		}
	}
}

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

C++: //
// Created by Undefined on 2018/2/2.
//

#include <iostream>

using namespace std;

int main() {
    int a, b, c, tmp;
    a = b = c = 0;
    for (int i = 0; i < 10; i++) {
        scanf("%d", &tmp);
        if (tmp > a) {
            c = b;
            b = a;
            a = tmp;
        } else if (tmp > b) {
            c = b;
            b = tmp;
        } else if (tmp > c) {
            c = tmp;
        }
    }
    printf("%d\n%d\n%d\n", a, b, c);
    return 0;
}

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

C++: #include <iostream>
using namespace std;
int main(void){
    int x, rank01,rank02,rank03 = 0;
    
    for(int i = 0; i < 10; i++){
        cin >> x;
        if(rank01 < x){
            rank03 = rank02;
            rank02 = rank01;
            rank01 = x;
        }
        else if(rank02 < x){
            rank03 = rank02;
            rank02 = x;
        }
        else if (rank03 < x){
            rank03 = x;
        }
       
       std::cout << rank01 << std::endl<< rank02 << std::endl << rank03 << std::endl; 
       
    }
}

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

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

C++: import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.io.PrintWriter;


class Main{
	public static void main(String[] args)throws IOException{
		int[] height=new int[10];
		String[] st=new String[10];

		File file=new File("in1.txt");
		BufferedReader br=new BufferedReader(new BufferedReader(new FileReader(file)));

		for(int i=0; i<10; i++){
			st[i]=br.readLine();
			height[i]=Integer.parseInt(st[i]);

			if(height[i]<0){
				height[i]*=-1;
			}
		}

		int a=0;		//a uses bubble sort


		for(int j=0; j<9; j++){
			for(int k=9; k>j; k--){
				if(height[k]<height[k-1]){
					a=height[k];
					height[k]=height[k-1];
					height[k-1]=a;

				}
			}
		}

		try{
			PrintWriter pw=new PrintWriter
					(new BufferedWriter(new FileWriter("out1.txt")));

			for(int l=0; l<3; l++){
				pw.println(height[9-l]);
			}
			pw.close();
		}

		catch(IOException e){
			System.out.println("err");
		}
	}
}