Go: package main

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

var maxint = 10000
var scanner = bufio.NewScanner(os.Stdin)

func nextInt() (int, error) {
	scanner.Scan()
	return strconv.Atoi(scanner.Text())
}

func main() {
	scanner.Split(bufio.ScanWords)
	arr := make([]int, 10)
	for i := range arr {
		n, _ := nextInt()
		arr[i] = n
	}

	sort.Slice(arr, func(i, j int) bool {
		return arr[i] >= arr[j]
	})

	arrStr := fmt.Sprintf("%+v", arr[0:3])
	arrStr = arrStr[1:(len(arrStr) - 1)]
	arrStr = strings.Replace(arrStr, " ", "\n", -1)
	fmt.Println(arrStr)
}

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

void
swap(int *a, int *b)
{
    int tmp;
    tmp = *a;
    *a = *b;
    *b = tmp;
}

int main(){

	int a[11],max1,max2,max3;

	for (int i=1; i<11; i++){
		while (true){ 
		cout << "山の高さ" << i << "（整数）" ;			
		cin >> a[i];
		if ((cin.good() == 1) && (a[i] >= 0) && (a[i] <= 10000)) {
			break;
		}
		}	
	}

	max1 = a[1];

	for (int i=2; i<11; i++){
		if (max1 < a[i]){
			swap(max1,a[i]);
		}
	}
	max2 = a[2];

	for (int i=3; i<11; i++){
		if (max2 < a[i]){
			swap(max2,a[i]);
		}
	}
	max3 = a[3];

	for (int i=4; i<11; i++){
		if (max3 < a[i]){
			swap(max3,a[i]);
		}
	}


		cout << max1 << endl;
		cout << max2 << endl;
		cout << max3 << endl;
		

return 0;
	}

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

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

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

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

sort(array,10);

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

return 0;
}

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

int main()
{
	int n[10],i=0;

	while (cin >> n[i])
		i++;
	sort(n,n+i-1,greater<int>());
	for (int j=0; j < 3; j++) {
		cout << n[j] << endl;
	}
	return 0;
}

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

int main()
{
    int height;
    vector<int> top3;

    while (cin >> height) {
        for (auto it = top3.begin(); it != top3.end(); it++) {
            if (height > *it) {
                it = top3.insert(it, height);
                break;
            }
        }
        if (top3.size() > 3)
            top3.pop_back();
        else if (top3.size() < 3)
            top3.push_back(height);
    }
    
    for (auto h: top3)
        cout << h << endl;

    return 0;
}

C++: #include <cstdio>
#include <algorithm>
using namespace std;
int main() {
	int h[10];
	for(int i=0;i<10;i++) {
		scanf("%d",&h[i]);
	}
	sort(h,h+10);
	for(int i=0;i<3;i++) {
		printf("%d\n",h[9-i]);
	}
}

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

int main(){
    int height;
    vector<int> heights;
    while (cin >> height)
	heights.push_back(height);
    sort(heights.begin(), heights.end(), greater<int>());
    for (int i = 0; i < 3; i++)
	cout << heights[i] << endl;
}

C++: #include <iostream>

using namespace std;
int data[10];
int temp;
int main()
{
    cout << "Input 10 Data(value = 1-10000): " << endl;
    for(int a = 0;a<10;a++)
    {
        cin >> data[a];
    }

    for(int x=0;x<10;x++)
    {
        for(int y=0;y<10;y++)
        {
            if(data[y]<data[x])
            {
                temp = data[x];
                data[x] = data[y];
                data[y] = temp;
            }
        }
    }
    cout << data[0] << endl;
    cout << data[1] << endl;
    cout << data[2] << endl;
}

C++: #include<cstdio>

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

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

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

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

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

C++: #include<iostream>
using namespace std;
int main(){
    cin.tie(0);
    ios::sync_with_stdio(false);
    int yama,top1=0,top2=0,top3=0;
    for(int i=0;i<10;i++){
        cin >> yama;
        if(top1<yama){
            top3 = top2;
            top2 = top1;
            top1 = yama;
        }
        else if(top2<yama){
            top3 = top2;
            top2 = yama;
        }
        else if(top3<yama){
            top3 = yama;
        }
    }
    cout << top1 << "\n" << top2 << "\n" << top3 << "\n";
}

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

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

int main()
{
    int a[10]={};
    int i;
    
    for (i=0; i<10; i++) {
        cin >> a[i];
    }
    
    sort(a,a+10);
    
    for (i=9; i>6; i--) {
        cout << a[i] <<endl;
    }
    
}

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

typedef long long int ll;
typedef pair<int, int> pii;
typedef vector<int> vi;
typedef vector<pair<int, int> > vii;
#define rrep(i, m, n) for(int (i)=(m); (i)<(n);  (i)++)
#define  rep(i, n)    for(int (i)=0; (i)<(n);  (i)++)
#define  rev(i, n)    for(int (i)=(n)-1; (i)>=0; (i)--)
#define vrep(i, c)    for(__typeof((c).begin())i=(c).begin(); i!=(c).end(); i++)
#define  ALL(v)       (v).begin(), (v).end()
#define mp            make_pair
#define pb            push_back
template<class T1, class T2> inline void minup(T1& m, T2 x){ if(m>x) m=static_cast<T2>(x); }
template<class T1, class T2> inline void maxup(T1& m, T2 x){ if(m<x) m=static_cast<T2>(x); }

#define INF 1000000000
#define MOD 1000000009
#define EPS 1E-9

const int n = 10;
int h[n];

int main()
{
  rep(i, n) cin >> h[i];
  sort(h, h+n, greater<int>());

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

  return 0;
}

C++: #include<iostream>
int main(){
	int a[10];
	int b;

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

	for (int i = 0; i < 10; i++){
		for (int j = i + 1; j < 11; j++){
			if (a[i] < a[j]){
				b = a[i];
				a[i] = a[j];
				a[j] = b;
			}
		}
	}

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

C++: #include<iostream>
using namespace std;
int main(){
  int a;
  int x=0;
  int y=0;
  int z=0;
  for(int i=1,i<=10,i++){
    cin >> a;
    if(a>x){
      x=a;
    }else if(y<a<=x){
      y=a;
    }else if(z<a<=y){
      z=a;
    }
  }
  cout << x << endl;
  cout << y << endl;
  cout << z << endl;
}

C++: #include<stdio.h>
int main()
{
	int top[3]={0};
	for(int i=0;i<10;i++)
	{
		int temp;
		scanf("%d",&temp);
		if(temp>top[0])
		{
			top[2]=top[1];
			top[1]=top[0];
			top[0]=temp;
		}
		else if(temp>top[1])
		{
			top[2]=top[1];
			top[1]=temp;
		}
		else if(temp>top[2])
		{
			top[2]=temp;
		}
	}
	printf("%d\n%d\n%d",top[0],top[1],top[2]);
}

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

using namespace std;

main(){
	int i=0,h[10];
	for(;i<10;)		cin>>h[i++];
	sort(h,h+10);
	for(i=9;i>6;)	cout<<h[i--]<<endl;
	exit(0);
}

C++: #include <iostream>
using namespace std;
int main(){
	int takasa[10];

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

	//????????????
	for (int i = 0; i < 9; i++) {
		for (int j = i+1; j < 10; j++) {
			if (takasa[i] <takasa[j]) {
				swap (takasa[i],takasa[j]);
			}
		}
	}
	
	for (int i = 0; i < 3; i++) {
		cout << takasa[i] << endl;
	}
	return 0;
}