Go: package main

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

func main() {
        fp := os.Stdin
        scanner := bufio.NewScanner(fp)
        var lst [3]int

        for scanner.Scan() {
                num, _ := strconv.Atoi(scanner.Text())
                if lst[0] < num {
                        lst[2] = lst[1]
                        lst[1] = lst[0]
                        lst[0] = num
                } else if lst[1] < num {
                        lst[2] = lst[1]
                        lst[1] = num
                } else if lst[2] < num {
                        lst[2] = num
                }
        }

        for _, i := range lst {
                fmt.Printf("%d\n", i)
        }
}

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

C++: #include<iostream>
using namespace std;
int main() {
	int a[10],min1=-1,min2=-1,min3=-1, i,j,k,l;
	for (i = 1; i <= 10; i++) {
		cin >> a[i];
	}
	for (j = 1; j <= 10; j++) {
		if (a[j] > min1) {
			min1 = a[j];
		}
	}
	for (k = 1; k <= 10; k++) {
		if (a[k] > min2 && a[k]!=min1) {
			min2 = a[k];
		}
	}
	for (l = 1; l <= 10; l++) {
		if (a[l] > min3&&a[l]!=min2&&a[l]!=min1) {
			min3 = a[l];
		}
	}
	cout << min3 << endl << min2 << endl << min1  << endl;
	return 0;
}

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

using namespace std;

int main()
{
    int a[10];
    int b;
    for(int i = 0; i< 10; i++)
    {
        scanf("%d", &a[i]);

    }

    //排序部分。????排序。
    for(int i = 0; i < 3 ; i++) //?出前三名
    {
        int max = i;
        for(int j = i; j < 10; j++)
        {
            if(a[j] > a[max])
            {
                max = j;
            }
        }
        int temp = a[max];
        a[max] = a[i];
        a[i] = temp;
        printf("%d\n", a[i]);
    }

    return 0;
}

C++: #include<iostream>
using namespace std;
int main()
{	
	int a[10] = {};
	int i = 0;
	while (cin >> a[i]) {
		i++;
		if (i == 10)break;
	}
	int max;
	for (int j = 0; j < 3; j++) {
		max = j;
		for (int k = j + 1; k < 10; k++) {
			if (a[max] < a[k]) {
				max = k;
			}
		}
		cout << a[max] << endl;
		a[max] = 0;
	}
	return 0;
}

C++: #include <iostream>
#include <cmath>
#include <cstdio>
#include <algorithm>
#include <vector>
#include <sstream>
#include <string>
#include <cstdlib>
using namespace std;

template <class T> int streamvar(std::istream& in, T& var)
{
    if (!in) {
        return 1;
    }
    in >> var;
    if (in.fail()) {
        return 1;
    }
    return 0;
}
template <class T> int streamvec(std::istream& in, std::vector<T> &v)
{
    v.clear();
    string s;

    if (!in) {
        return 1;
    }
    getline(in, s);
    if (in.fail()) {
        return 1;
    }
    istringstream is(s);
    while (1) {
        T tmp;
        is >> tmp;
        if (is.fail())
            break;
        v.push_back(tmp);
    }
    return 0;
}

int main(void)
{
    vector<int> v;
    int tmp;
    while (!streamvar(cin, tmp)) {
        v.push_back(tmp);
    }
    sort(v.begin(), v.end(), greater<int>());
    cout << v[0] << " " << v[1] << " " << v[2] << endl;
    return 0;
}

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

int main(void){
	int cou = 0, mount[10];
	
	for(int i = 0; i < 10; i++){
		cin >>mount[i];
	}
	
	while(cou < 9){
		for(int i = cou; i < 10; i++){
			if(mount[cou] < mount[i]) swap(mount[cou], mount[i]);
		}
		cou++;
	}
	
	for(int i = 0; i < 3; i++){
		cout <<mount[i]<<endl;
	}
	
	return 0;
}

C++: #include<stdio.h>
int main(){
	int l[10],r[10]={-1};
	int i,j,k,c[10]={11},n=0;
	for(i=0;i<10;i++){
		scanf("%d",&l[i]);
	}
	for(j=0;j<10;j++){
		for(i=0;i<10;i++){
			for(k=0;k<10;k++){
				if(c[k]==i){
					n=1;
				}
			}
			if(!(n==1)){
				if(l[i]>=r[j]){
					r[j]=l[i];
					c[j]=i;

				}
			}

			n=0;
		}
	}
	for(i=0;i<3;i++){
		printf("%d\n",r[i]);
	}
	return 0;
}

C++: #include <stdio.h>
#include <algorithm>
#include <iostream>
using namespace std;
int main(){
    int n, i, s, g, a[100];
    for(i=0;i < 10;i++)
    scanf("%d", &a[i]);
    sort(a, a+i);
    printf("%d\n%d\n%d\n", a[9], a[8], a[7]);
    return 0;
    }

C++: #include <cstdio>
#include <algorithm>
#include <vector>
#include <functional>

using namespace std;

int main() {
	int h[10] = { 0 };

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

	sort(h, h + 10, std::greater<int>());
	for (int i = 0; i < 3; i++)
	{
		printf("%d\n", h[i]);
	}
	
}