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<vector>
#include<algorithm>
using namespace std;

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

  sort(a.begin(),a.end());

  cout<<a[9]<<endl<<a[8]<<endl<<a[7]<<endl;

  return(0);
}

C++: #include <stdio.h>

int main(){

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

C++: #include<iostream>
using namespace std;
int main() {
	typedef unsigned short int mew;
	mew mountain[10];
	for (int i = 0; i < 10; i++) {
		cin >> mountain[i];
	}

	mew taller[3];
	mew a, b, c;

	a = mountain[0];
	b = mountain[1];
	c = mountain[2];

	for (int y = 3; y <= 9; y++) {
		if (a<=b){
			if (a<=c){
				if (a < mountain[y]) {
				???a = mountain[y];}
			}
			else{
				if (c < mountain[y]) {
					c = mountain[y];}
			}
		}
		else if (b<=c)
		{
			if (b < mountain[y]) {
				b = mountain[y];}
		}
	}

	//biggest->taller[0],bigger->taller[1],taller[2]
	{
		if (a >= b&&a >= c)
		{
			taller[0] = a;
			if (b >= c)
			{
				taller[1] = b;
				taller[2] = c;
			}
			else {
				taller[1] = c;
				taller[2] = b;
			}
		}
		if (b >= a&&b >= c)
		{
			taller[0] = b;
			if (a >= c)
			{
				taller[1] = a;
				taller[2] = c;
			}
			else {
				taller[1] = c;
				taller[2] = a;
			}
		}
		if (c >= b&&c >= a)
		{
			taller[0] = c;
			if (b >= a)
			{
				taller[1] = b;
				taller[2] = a;
			}
			else {
				taller[1] = a;
				taller[2] = b;
			}
		}
	} 

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

	return 0;
}

C++: #include <iostream>

using namespace std;

void buble_sort(int high[]){
    int i,j,v;

    for(i = 0;i < 9;i++){
        v = i;
        for(j = i;j <= 9;j++){
            if(high[v] < high[j]){
                v = j;
            }
        }
        int box = high[i];
        high[i] = high[v];
        high[v] = box;

    }
}

int main() {
    int i,high[10];

    for (i = 0;i <= 9;i++){
        cin >> high[i];
    }

    buble_sort(high);

    for(i = 0;i <= 2;i++){
        cout << high[i] << endl;
    }

    return 0;
}

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

int main() {
	int n[10],top,tap,min,h=0;
	for(int i=0;i<10;i++){
		cin>>n[i];
	}
	for(int j=0;j<10;j++){
				if(top<n[j]){
					h=top;
					min=tap;
					top=n[j];
					tap=h;
					h=0;
				}
				else if(tap<n[j]){
					min=tap;
					tap=n[j];
				}
				else if(min<n[j]){
					min=n[j];
				}
			}
	cout<<top<<"\n"<<tap<<"\n"<<min<<endl;
	return 0;
}

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

using namespace std;

int main(){

  int in;
  vector<int> V;

  while(cin >> in){
    V.push_back(in);
  }

  sort(V.begin(), V.end());
  reverse(V.begin(), V.end());

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

  return 0;
}

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

int int_cmp(const int *a, const int *b)
{
    if (*a > *b)
        return (-1);
    else if (*a < *b)
        return (1);
    return (0);
}

int main(void){
    int i;
	int x[10];
	for(i=0;i<10;i++){
		scanf("%d",&x[i]);
	}
	qsort(x,10,sizeof(int),  (int(*)(const void*, const void*))int_cmp);

	printf("%d\n%d\n%d\n",x[0],x[1],x[2]);

}

C++: #include<iostream>
#include<cstdio>
#include<algorithm>
#include<functional>
 
using namespace std;
 
int main(){
int height[10000], i=0;
 
while(cin >> height[i++]);
 
partial_sort(height, height+3, height+i, greater<int>());
 
cout << height[0] << endl;
cout << height[1] << endl;
cout << height[2] << endl;
 
return 0;
}

C++: #include <iostream>
#include <algorithm>
#include <vector>
#include <stack>
#include <queue>
#include <map>
#include <cmath>
#include <string>
#include <sstream>
#include <iomanip>
#include <complex>
using namespace std;

#define ll long long
#define vvi vector< vector<int> >
#define All(X) X.begin(),X.end()
#define FOR(i,a,b) for(int i=(int)(a);i<(int)(b);i++)
#define REP(i,n) for(int i=0;i<(int)(n);i++)
#define pb push_back 
ll gcd(ll a,ll b){return b?gcd(b,a%b):a;}
ll lcm(ll a,ll b){return a/gcd(a,b)*b;}

vector<int> data;

int main(){
	REP(i,10){
		int tmp;
		cin >> tmp;
		data.pb(tmp);
	}
	sort(All(data));
	cout << data[9] << endl;
	cout << data[8] << endl;
	cout << data[7] << endl;
	return 0;
}

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


int N,M,p,d[10000],x[4],r,l;
int main(){
for(int i=0;i<10;i++){
cin>>d[i];
}
sort(d,d+10);
for(int i=0;i<3;i++){
cout<<d[i]<<endl;}
return 0;
}

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

int main()
{
	int x[10];
	int i,j,tmp;
	for(i=0;i<10;i++){
		cin >> x[i];
	}
	for(i=0;i<n-1;i++){
		for(j=n-1;j>i;j--){
			if(x[j]<x[j-1]){
				tmp = x[j];
				x[j] = x[j-1];
				x[j-1] = x[j];
			}
		}
	}
	cout <<x[0] <<endl;
	cout <<x[1] <<endl;
	cout <<x[2] <<endl;
		
		
		
	
	return 0;
}

C++: #include<iostream>
#include<vector>
#include<algorithm>
#include <functional>
using namespace std;
int main()
{
	vector<int> m;
	int n;
	for (int i = 0; i < 10; i++)
	{
		cin >> n;
		m.push_back(n);
	}
	sort(m.begin(), m.end(), std::greater<int>());
	for (int i = 0; i <= 3; i++)
		cout << m[i] << endl;
	return 0;
}

C++: #include<cstdio>
#include<iostream>
#include<algorithm>
#include<vector>
using namespace std;
int main(){
  int hill;
  vector<int> ar;
  for(int i=0;i<10;i++){
    cin >> hill;
    ar.push_back( hill );
  }
  sort( ar.begin() , ar.end() , greater<int>() ); // 降順ソート
  for(int i=0;i<3;i++){
    cout << ar[i] << endl;
  }
  ar.clear();
}

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);
	cout << a[9] << endl;
	cout << a[8] << endl;
	cout << a[7] << endl;
}

C++: #include <stdio.h>
#include <math.h>
#include <iostream>
using namespace std;

int main(void){
	int x[10],top[3];
	int i;

	for(i=0;i<3;i++){
		top[i] = 0;
	}
	for(i=0;i<10;i++){
		std::cin >> x[i];
		if(top[0] < x[i]){
			top[2] = top[1];
			top[1] = top[0];
			top[0] = x[i];
		}
		if(top[1] < x[i]){
			top[2] = top[1];
			top[1] = x[i];
		}
		if(top[2] < x[i]){
			top[2] = x[i];
		}
	}

	std::cout << top[0] << "\n" << top[1] << "\n" <<top[2] << "\n";
	return 0;

C++: #include <bits/stdc++.h>
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>=7;i--) cout<<a[i]<<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)}

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

C++: #include<iostream>
using namespace std;
int main()
{
	int mhr[20],i,j,c;
	for(i=1; i<=10; i++)
	{
		cin >> mhr[i];
	}
	for(i=1; i<=10; i++)
	{
		for(j=1; j<=10; j++)
		{
			if(mhr[j]<mhr[j+1])
			{
				c=mhr[j];
				mhr[j]=mhr[j+1];
				mhr[j+1]=c;
			}

		}
	}
	for(i=1; i<=3; i++)
	{
		cout << mhr[i] << endl;
	}

    return 0;
}

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

int main()
{
	int i,a[10],no1,no2,no3,x;
	no1=0; no2=0; no3=0;
	for(i=0;i<10;i++){
		cin>>a[i];
	}
	for(i=0;i<10;i++){
		if(no3<a[i]){ no3=a[i];}
		if(no2<no3){ x=no2; no2=no3; no3=x;}
		if(no1<no2){ x=no1; no1=no2; no2=x;}
	}
	cout<<no1<<endl<<no2<<endl<<no3<<endl;
}