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++: #include <iostream>
#include <stdio.h>
#include <algorithm>
#include <math.h>
#include <vector>
#include <string>
#include <sstream>
#include <numeric>
#include <set>
#include <map>
//#include <bits/stdc++.h>

#define rep(i, j) for(int i = 0; i < j; i++)
#define all(i) i.begin(), i.end()
#define ll long long
#define bl bool
#define nn printf("\n");
#define mod 1000000007

using namespace std;

int main()
{
	cin.tie(0);
	ios::sync_with_stdio(false);

	vector<int> dat(10, 0);
	rep(i, 10) { cin >> dat[i]; }
	sort(all(dat));
	rep(i, 3) { printf("%d\n", dat[9 - i]); }

	return 0;
}

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

class Mountain {
public:
	int mountain[10];
	void get();
	void sort(int yama[10]);
	void show();
};

void Mountain::get() {
	for (int i = 0; i < 10; i++) {
		cin >> mountain[i];
	}
}

void Mountain::sort(int yama[10]) {
	int work;
	for (int i = 0; i < 9; i++) {
		for (int j = 0; j < 9; j++) {
			if (yama[j] < yama[j + 1]) {
				work = yama[j];
				yama[j] = yama[j + 1];
				yama[j + 1] = work;
			}
		}
	}
}

void Mountain::show() {
	for (int i = 0; i < 3; i++) {
		cout << mountain[i] << endl;
	}
}

int main() {
	Mountain mou;
	mou.get();
	mou.sort(mou.mountain);
	mou.show();
}

C++: #include<iostream>
using namespace std;int main(){ int i = 0,j=0,k=0;
int mountain[11] = {1819,2003,876,2840,1723,1673,3776,2848,1592,922}; for(i=0;i<10;i++){
for(j=i+1;j<10;j++){
if(mountain[i] < mountain[j]){
k = mountain[j];
mountain[j] = mountain[i] ;
mountain[i] = k ;
}
}
} for(i=0;i<3;i++){
cout << mountain[i] <<"\n" ;
}
return 0;
}

C++: #include <cmath>
#include <ctime>
#include <algorithm>
#include <iostream>
#include <map>
#include <numeric>
#include <set>
#include <sstream>
#include <string>
#include <vector>
#include <list>
#include <deque>
#include <stack>
#include <bitset>
#include <functional>
#include <numeric>
#include <utility>
#include <iomanip>
#include <cstdio>
#include <cctype>
#include <queue>
#include <complex>
#include <climits>

typedef long long ll;

using namespace std;

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

	sort(h, h+10, greater<int>());

	cout << h[0] << endl << h[1] << endl << h[2] << endl;

	return 0;
}

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

int main(){
    int n;
    int m[3];
    m[0]=m[1]=m[2]=0;
    for(int i=0;i<10;i++)
    {
        cin >> n;
        if(n>m[0]) { m[2]=m[1]; m[1]=m[0]; m[0] = n;}
        else if(n>m[1]){ m[2]=m[1]; m[1] = n; }
        else if(n>m[2]) m[2] = n;
    }
    for(int i=0;i<3;i++) cout << m[i] << endl;
    return 0;
}

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

C++: /*
 *  Author: mizo0203
 *  Problem: 0001
 *  Status: Accepted
 *  Submission Date: 2012/04/15 01:49:02
 *
 *  方策：クイックソートを行う．
 *  C言語の標準ライブラリ<stdlib.h>にもqsort()という
 *  クイックソートを行う関数があるが，扱いにくいためC++の
 *  標準ライブラリ<algorithm>のsort()を使用する．
 */
#include <stdio.h>
#include <algorithm> // sort()を使うのに必要

// C++のライブラリを使用するのに必要
using namespace std;

int h[10];

void input() {
  int i;

  for (i = 0; i < 10; i++) {
    scanf("%d", &h[i]);
  }
}

int main() {
  int i;

  input();
  sort(h, h + 10);
  for (i = 0; i < 3; i++)
    printf("%d\n", h[9 - i]);

  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 x[10];
	for (int i = 0; i < 10; i++){
		cin >> x[i];
	}
	sort(begin(x), end(x));
	cout << x[9];
	cout << x[8];
	cout << x[7];
	
}

C++: #include<iostream>

using namespace std;

int main()
{
	int high[10] = { };
	int first = 0, second = 0, third = 0;
	
	for(int i = 0; i < 10; i++){
		cin >> high[i];
		
		if(first < high[i]){
			second = first;
			first = high[i];
		}
		else if(second < high[i]){
			third = second;
			second = high[i];
		}
		else if(third < high[i])
			third = high[i];
	}
	
	cout << first << endl << second << endl << third << endl;
	
	
	return 0;
}

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

int N;

int main(){
	N = 10;
	int t;
	int mh[N];
	
	for(int i=0; i<10; i++){
		cout << "height of mountain " << i+1 << " : ";
		cin >> t;
		if(t>=0 && t<=10000)
			mh[i]=t;
		else{
			i=i-1;
			cout << "over!\n";
		}
	}
	
	for(int i=0; i<10; i++){
		for(int j=i+1; j<10; j++){
			if(mh[i] < mh[j]){
				t = mh[i];
				mh[i] = mh[j];
				mh[j] = t;
			}
		}
	}
	
	cout << "----------------------\n";
	
	for(int i=0; i<3; i++)
		cout << "height of the " << i+1 << " mountain: " << mh[i] << "\n";
	
	return 0;
}

C++: #include <stdio.h>
#include <iostream>

using namespace std;

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

	for (int i = 1; i < 10; i++) {
		int v = H[i];
		int j = i - 1;
		while (j >= 0 && H[j] < v) {
			H[j + 1] = H[j];
			j--;
		}
		H[j + 1] = v;
	}

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

	return 0;
}

C++: #include <iostream>
#define N 10

using namespace std;

void swap(int& a, int& b){
	int tmp;
	if (a > b){
		tmp = a;
		a = b;
		b = tmp;
	}
}

void bubble(int mountain[N]){
	for (int i=0; i<(N-1); ++i){
		for (int j=i; j<(N-1); ++j){
			swap(mountain[j], mountain[j+1]);
		}
	}
}


int main(void){
	int mountain[N] = {0, };
	for (int i=0; i<N; ++i){
		cin >> mountain[i];
		if ((mountain[i] < 0) || (mountain[i] > 10000)){
			cout << "Range out!" << endl;
			return -1;
		}
	}
	bubble(mountain);
	//cout << "output!" << endl;
	for (int i=9; i>=7; --i){
		cout << mountain[i] << endl;
	}
	return 0;
}

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

using namespace std;

int main() {
	int m[10];

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

	stable_sort(m, m + 10);

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