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<iostream>
using namespace std;

#define MAX 10000

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

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

using namespace std;

int main(){

	int i,j,copy;
	int n[10];

	for (i = 0; i < 10; i++) 
		cin >> n[i];
	
	

	for (i = 0; i < 10; i++) {
		for (j = i + 1; j < 10; j++) {
			if (n[i] < n[j]) {
				copy = n[i];
				n[i] = n[j];
				n[j] = copy;
			}
		}
	}

	for (i = 0; i < 3; i++) 
		cout << n[i] << endl;
	
	return 0;
}

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

int main(){
    int mt[10], tmp;
    int g = 1;

    for(int i = 0; i < 10; ++i){
        cin >> mt[i]; 
    }
    while(g){
        g = 0;
        for(int i = 1; i < 10; ++i){
            if(mt[i - 1] < mt[i]){
                tmp = mt[i - 1];
                mt[i - 1] = mt[i];
                mt[i] = tmp;
                g = 1;
            }
        }
    }
    
    for(int i = 0; i < 3; ++i){
        cout << mt[i] << endl;
    }
    return 0;
}

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

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

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

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

	for (int i = 0; i < 9; i++)
	{
		for (int j = 9; j >= i; j--)
		{
			if (a[i] > a[j])
			{
				int t = a[i];
				a[i] = a[j];
				a[j] = t;
			}
		}
	}

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

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

using namespace std;

int main() {
    vector<int> heights;
    
    for (int i = 0; i < 10; i++) {
        int tmp;
        cin >> tmp;
        heights.push_back(tmp);
    }
    
    sort(heights.begin(), heights.end(), greater<int>());
    cout << heights[0] << endl;
    cout << heights[1] << endl;
    cout << heights[2] << endl;
    
    return 0;
}

C++: #include<stdio.h>
int main(void)
{
	int a, b, max = 0, max2 = 0, max3 = 0;
	for (a = 1; a <= 10; a++) {
		scanf("%d", &b);
		if (b > max) {
			max = b;
		}
		else if (b > max2) {
			max2 = b;
		}
		else if (b > max3) {
			max3 = b;
		}
	}
		printf("%d\n %d\n %d\n", max, max2, max3);
		return 0;
}

C++: #include <stdio.h>

int fir(const int*);
int sec(const int*);
int thi(const int*);

int main(void)
{
	int i,h[10];
	for(i=0;i<10;i++){
		scanf("%d",&h[i]);
	}
	printf("%d",fir(h));
	printf("%d",sec(h));
	printf("%d",thi(h));
	return 0;
}

int fir(const int *h){
	int i,f=0;
	for(i=0;i<10;i++){
		f<h[i] ? f=h[i] : /*処理無し*/;
	}
	return f;
}

int sec(const int *h){
	int i,f,s;
	for(i=0;i<10;i++){
		f<h[i] ? f=h[i] : /*処理無し*/;
	}
	for(i=0;i<10;i++){
		f>=h[i] && s<h[i] ? s=h[i] : /*処理無し*/;
	}
	return s;
}

int thi(const int *h){
	int i,f,s,t;
	for(i=0;i<10;i++){
		f<h[i] ? f=h[i] : /*処理無し*/;
	}
	for(i=0;i<10;i++){
		f>=h[i] && s<h[i] ? s=h[i] : /*処理無し*/;
	}
	for(i=0;i<10;i++){
		s>=h[i] && t<h[i] ? t=h[i] : /*処理無し*/;
	}
	return t;
}

C++: //include----------------------------------------------------------------------------------------------------------------------
#include <bits/stdc++.h>
 
//using namespace--------------------------------------------------------------------------------------------------------------
using namespace std;
 
//define-----------------------------------------------------------------------------------------------------------------------
#define rep(i, n) for(int i = 0; i < (int)n; i++)
#define FOR(i, s, n) for(int i = s; i < (int)n; i++)
#define per(i, n) for(int i = n; i >= 0; i--)
#define ROF(i, s, n) for(int i = s; i >= (int)n; i--)
#define FORIT(i, A) for (auto i : A)
#define PRINT(x) cout << (x) << "\n"
#define ALL(a) (a).begin(),(a).end()
#define RALL(a) (a).rbegin(), (a).rend()
#define PB push_back
#define MP make_pair
#define EACH(i, n) for (__typeof((n).begin()) i = (n).begin(); i != (n).end(); ++i)
#define SZ(a) int((a).size())
#define EXIST(s,e) ((s).find(e)!=(s).end())
#define SORT(c) sort((c).begin(),(c).end())
#define INF 1 << 25
#define CLR(a) memset((a), 0 ,sizeof(a))
#define dump(x) cerr << #x << " = " << (x) << "\n";
#define debug(x) cerr << #x << " = " << (x) << " (L" << __LINE__ << ")" << " " << __FILE__ << "\n";
#define sq(n) (n) * (n)
 
//typedef----------------------------------------------------------------------------------------------------------------------
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector<string> VS;
typedef pair<int, int> PII;
typedef long long LL;
typedef unsigned int uint;
typedef unsigned long long ull;
 
//const------------------------------------------------------------------------------------------------------------------------
const double EPS = 1e-10;
const double PI = acos( -1.0 );
 
//global-----------------------------------------------------------------------------------------------------------------------
vector<int> a(10);
 
//function---------------------------------------------------------------------------------------------------------------------
int main() {
    rep( i, 10 ) {
        scanf( "%d", &a[ i ] );
    }
    sort( a.begin(), a.end() );
    ROF( i, 9, 7 ) {
        printf( "%d\n", a[ i ] );
    }
    return 0;
}

C++: #include <stdio.h>
#include <functional>
#include <algorithm>
int main(){ int mt[10], i;
for (i = 0; i < 10; i++)
scanf("%d",&mt[i]);
std::sort(mt, mt + 10);
for (i = 9; i > 6; i--)
  printf("%d\n", mt[i]);
return 0; }

C++: #include <iostream>
#include <queue>
#include <vector>
#include <set>
#include <algorithm>
#include <stdio.h>
//#define int long long
inline int in() { int32_t x; scanf("%d", &x); return x ;}
using namespace std;
//const int INF = 1e18;
const int MAX_N = 1e5 + 5;
struct top3
{
    int a[4] = {0 , 0 , 0 , 0};
    void add(int x)
    {
        a[3] = x;
        sort(a , a + 4 , greater<int>());
    }
}tp;
int32_t main()
{
    int x;
    
    while (scanf("%d",&x) != EOF)
    {
        tp.add(x);
    }
    
    cout << tp.a[0] << endl << tp.a[1] << endl << tp.a[2] << endl;
}

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

int main(){
	int first = 0;
	int second = 0;
	int third = 0;

	for(int i = 0; i < 10; i++){
		int num;

		cin >> num;

		if(first <= num){
			third = second;
			second = first;
			first = num;
		}else if((second <= num) && (num < first) ){
			thid = second;
			second = num;
		}else if((third <= num) && (num < second)){
			third = num;
		}else{
			//???????????????
		}
	}
	cout << first << endl;
	cout << second << endl;
	cout << third << endl;

    return 0;
}