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<stdio.h>
nit mian(void)
{
	int i,j,n[11],w;
	for(i=0;i<10;i++){
		scanf("%d",n[i]);
	}
	for(i=0;i<10;i++){
		for(j=0;j<=10;j++){
			if(n[j]<=n[i]){
				w=n[i];
				n[i]=n[j];
				n[j]=w;
			}
		}
	}
	for(i=0;i<3;i++){
		printf("%d\n",y[i]);
	}
	return 0;
}

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


long long a[10];

int cmp (const void *p1, const void *p2) {
  if (* (long long *)p1 > * (long long *)p2) return 1;
  if (* (long long *)p1 == * (long long *) p2) return 0;
  return -1;
}

int main () {
  int i;
  for (i = 0; i < 10; i++) {
    scanf("%lld", a + i);
  }
  qsort(a, 10, sizeof(long long),  cmp);
  for (i = 0; i < 3; i++) {
    printf("%lld\n", a[9-i]);
  }
  return 0;
}

C++: #include <iostream>

int main(int argc, char ** argv) {
  int input, top[3] = {0};
  for (int i=0; i<10; i++) {
    std::cin >> input;
    if (input >= top[0]) {
      top[2] = top[1];
      top[1] = top[0];
      top[0] = input;
    }
  }

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

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

int main(){
  int a;
  vector<int> v;

  for (unsigned int i = 0; i < 10; i++) {
    cin >> a;
    v.push_back(a);
    if (cin.eof()) { break; }
  }

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

  sort(v.begin(), v.end());
  return 0;
}

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