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>
#include <vector>
#include <set>
#include <map>
#include <list>
#include <iterator>
#include <queue>
#include <stack>
#include <deque>
#include <sstream>
#include <algorithm>
#include <numeric>
#include <string>
#include <cmath>
#include <complex>
#include <functional>
#include <cstdio>
#include <cstring>
#include <cstdlib>
#include <cassert>
#include <cstdlib>
#include <cctype>
#define REP(i,m,n) for(int i=m;i<n;i++)
#define rep(i,n) for(int i=0;i<n;i++)
#define rp(i,c) rep(i,(int)c.size())
#define fr(i,c) for(__typeof((c).begin()) i=(c).begin();i!=(c).end();i++)
#define mp make_pair
#define pb push_back
#define all(c) (c).begin(),(c).end()
#define rall(u) (u).rbegin(),(u).rend()
#define dbg(x) cerr<<#x<<" = "<<(x)<<endl
#define v_delete(a,b) (a).erase(remove((a).begin(), (a).end(), b), (a).end())
#define v_unique(a) (a).erase(unique((a).begin(), (a).end()), (a).end())
#define VV(T) vector<vector< T > >
#define init(a,b) memset((a), (b), sizeof((a)))
using namespace std;

typedef long long ll;
typedef vector<int> vi;
typedef pair<int,int> pi;
const int inf=1<<28;
const double INF=1e10,EPS=1e-9;


template<class T>int SIZE(T a){return a.size();}
template<class T>string IntToString(T num){string res;stringstream ss;ss<<num;return ss.str();}
template<class T>T StringToInt(string str){T res=0;for(int i=0;i<SIZE(str);i++)res=(res*10+str[i]-'0');return res;}
template<class T>T gcd(T a,T b){if(b==0)return a;return gcd(b,a%b);}
template<class T>T lcm(T a,T b){return a/gcd(a,b)*b;}

template <class T> void input(T& a, int n) { for (int i = 0; i < n; ++i) cin >> a[i]; }
template <class T> void input(T* a, int n) { for (int i = 0; i < n; ++i) cin >> a[i]; }
typedef pair<int,int> pii;

inline bool IN(int x, int y, int w, int h)
{
    return 0 <= x && x < w && 0 <= y && y < h;
}


int main()
{

	vi l;
	rep(i,10){
		int tmp;
		cin >> tmp;
		l.pb(tmp);
	}
	sort(l.begin(),l.end(),greater<int>());
	cout << l[0] << endl;
	cout << l[1] << endl;
	cout << l[2] << endl;

	return 0;
}

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

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

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

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

int main() {
	int a[810];
	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++: #include <iostream>

int main() {
  int x;
  int rank1 = 0;
  int rank2 = 0;
  int rank3 = 0;
  for (int i = 0; i < 10; i++) {
    std::cin >> x;
    if (x > rank1) {
      rank3 = rank2;
      rank2 = rank1;
      rank1 = x;
    } else if (x > rank2) {
      rank3 = rank2;
      rank2 = x;
    } else if (x > rank3) {
      rank3 = x;
    }
  }
  std::cout << rank1 << ' ' <<  rank2 << ' ' << rank3 << std::endl;
  return 0;
}

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

namespace
{
	std::vector<unsigned int> altitude(10);
}

int main()
{
	for (unsigned int i = 0; i < 10; i++)
	{
		std::scanf("%u", &altitude[i]);
	}
	std::sort(altitude.begin(), altitude.end(), std::greater<unsigned int>());
	for (unsigned int i = 0; i < 3; i++)
	{
		std::printf("%u\n", altitude[i]);
	}
}

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

int main() {
	int X[10];
	for (int i = 0; i < 10; i++) {
		cin >> X[i];
	}
	sort(X, X + 10, greater<int>());
	for (int i = 0; i < 3; i++) {
		cout << X[i] << endl;
	}
	return 0;
}

C++: #include <iostream>
#include <iomanip>
#include <vector>
#include <string>
#include <stack>
#include <queue>
#include <deque>
#include <set>
#include <map>
#include <algorithm>
#include <sstream>
#include <cstdlib>
#include <cstring>
#include <functional>
#include <numeric>
#include <cmath>
#include <climits>
#include <limits>
#include <cfloat>
#include <fstream>
using namespace std;

int main()
{
	string str = "";
	int n;
	vector <int> hight;

	while (getline (cin, str )){
		stringstream ssn(str);
		ssn >> n;
		hight.push_back(n);
	} // end while

	sort (hight.begin(), hight.end(), greater<int>() );
	
	int i;
	for (i = 0; i < 3; ++i){
		cout << hight[i] << endl;
	} // end for
		
	return 0;
}

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

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

	return 0;
}

C++: #include <stdio.h>

int main(void)
{
	int       i = 0;
	int buf[10] = { 0 };
	int top3[3] = { 0 };
	printf("??????10?????\????????????????????????\n");
	while(i < 10) {
		scanf("%d",&buf[i]);
		if(10000 < buf[i] ||
		   0     > buf[i]) {
			//printf("??\??????????????????");
			continue;
		}
		i++;
	}
	
	for(i = 0; i < 10; i++) {
		if(buf[i] > top3[2]) {
			if(buf[i] > top3[1]){
				if(buf[i] > top3[0]){
						top3[2] = top3[1];
						top3[1] = top3[0];
						top3[0] = buf[i];
				}
				else{
					top3[2] = top3[1];
					top3[1] = buf[i];
				}
			}
			else {
				top3[2] = buf[i];
			}
		}
	}
	printf("%d\n%d\n%d\n", top3[0],top3[1],top3[2]);
	return 0;
}

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

int main()
{
	int a[10];
	int data_size = sizeof(a) / sizeof(a[0]) - 1;
	for (int i=0;i<=data_size;i++)
		cin >> a[i];
	sort(a,a+sizeof(a) / sizeof(a[0]));
	for (int j=data_size;j<=data_size-2;j--)
		cout << a[j] << ",";
}

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

int main(){
    int i;
    int mount[10];
    int *p=&mount[0];
    for(i=0;i<10;i++){
        scanf("%d\n",p);
        p++;
    }
    sort(mount,mount+10,[](int x,int y){return x>y;});
    printf("%d\n%d\n%d",mount[0],mount[1],mount[2]);
    return 0;
}

C++: #include <iostream>
using namespace std;
 
int main()
{
    const int N = 10;
    int A[N];
    const int M = 3;
    int top[M] = {0};
 
    for (int i = 0; i < N; i++)
        cin >> A[i];
 
    for (int i = 0; i < N; i++)
    {
        if(top[0] < A[i])
        {
            top[2] = top[1];
            top[1] = top[0];
            top[0] = A[i];
        }
        else if(top[1]<A[i])
        {
            top[2] = top[1];
            top[1] = A[i];
        }
        else if(top[2] < A[i])
            top[2] = A[i];
    }
 

    for(int i = 0; i < M; i++)
        cout << ' ' << top[i];
    cout << endl;
 
    return 0;
}

C++: #include <iostream>

int main(){
	int m,mf=0,ms=0,mt=0;
	for(int a=0;a<10;a++){
		std::cin>>m;
		if(m>mf){
			mt=ms;
			ms=mf;
			mf=m;
			m=0;
	    }
		if(m>ms){
			mt=ms;
			ms=m;	
			m=0;
		}
			
		if(m>mt){
			mt=m;
			
		}
			
		
	}
	std::cout<<mf<<std::endl<<ms<<std::endl<<mt<<std::endl;
	return 0;
}