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;

int main(){

unsigned short mt_list[10];

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

unsigned short high[3] = {0};
for(int h=0; h<3; h++){
for(int i=0; i<10; i++){
if(high[h] >= mt_list[i]){
high[h] = i;
}
}
unsigned short tmp = high[h];
high[h] = mt_list[tmp];
mt_list[tmp] = 0;
}

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

return 0;
}

C++: #define _CRT_SECURE_NO_DEPRECATE
#include <iostream>
#include <cstdio>
#include <algorithm>
using namespace std;
const int MAXN = 10000;
int a[MAXN + 10];
bool cmp(int a, int b)
{
	return a > b;
}
int main()
{
	int p = 0;
	while (scanf("%d", &a[p++])!=EOF);
	sort(a, a + p,cmp);
	printf("%d\n%d\n%d\n", a[0], a[1], a[2]);
	return 0;
}

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

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

int main() {
  int height[10];
  for (int i = 0; i < 10; ++i) {
    cin >> height[i];
  }
  int maxHight[3] = {0, 0, 0};
  for (int i = 0; i < 10; ++i) {
    for (int j = 0; j < 3; ++j) {
      if (maxHight[j] < height[i]) {
	for (int k = 2; k > j; --k) { // 入れ替える
	  maxHight[k] = maxHight[k-1];
	}
	maxHight[j] = height[i];
	break;
      }
    }
  }
  for (int i = 0; i < 3; ++i) {
    cout << maxHight[i] << endl;
  }
}

C++: #include <iostream>
#include <complex>
#include <sstream>
#include <string>
#include <algorithm>
#include <deque>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <vector>
#include <set>
#include <limits>
#include <cstdio>
#include <cctype>
#include <cmath>
#include <cstring>
#include <cstdlib>
#include <ctime>
using namespace std;
#define REP(i, j) for(int i = 0; i < (int)(j); ++i)
#define FOR(i, j, k) for(int i = (int)(j); i < (int)(k); ++i)
#define SORT(v) sort((v).begin(), (v).end())
#define REVERSE(v) reverse((v).begin(), (v).end())
typedef complex<double> P;
const int N = 10;

int main() {
  vector<int> ms(N);
  REP(i, N) scanf("%d", &ms[i]);
  SORT(ms);
  printf("%d\n%d\n%d\n", ms[N - 1], ms[N - 2], ms[N - 3]);
  return 0;
}

C++: #include<stdio.h>
#include<algorithm>
#include<iostream>
using namespace std;          
int main(void){
    /* 宣言と初期化 */
    int hai[10];
    int id[2];
    int i;
    int temp2nd;
    int temp3rd;
    int tempmax;
            
for(i=0;i<10;i++)
{
   cin >> hai[i];
}
    /* 代入 */
    temp2nd=hai[0];
    tempmax=hai[0];
    temp3rd=hai[0];
    /* 計算 */
    for(i=0;i<10;i++){
        /* 最大値求める */
        if(hai[i]>tempmax)
       {tempmax=hai[i];id[0]=i;}
    }
    for(i=0;i<10;i++){
        /*2番目求める */
        if(hai[i]<tempmax&&hai[i]>temp2nd&& i != id[0])
        {temp2nd=hai[i];id[1]=i;}
    }
    for(i=0;i<10;i++){
        /* 3番目求める */
        if(hai[i]>temp3rd&&hai[i]<temp2nd && i != id[1] && i != id[0])
       {temp3rd=hai[i];}
    }
            
    /* 表示 */
    printf("最も高い山の高さ　%d\n",tempmax);
    printf("２番目に高い山の高さ　%d\n",temp2nd);
    printf("３番目に高い山の高さ　%d\n",temp3rd);
            
    return 0;
}

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

int main()
{
	int iHigh[10];

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

	sort( iHigh,iHigh+9,greater<int>() );

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

	return 0;
}

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

int main()
{
priority_queue<int> que;
for(int i=0;i<10;i++)
{
int t;
cin>>t;
que.push_pack(t);
}
for(int i=0;i<3;i++)
{
cout<<que.top()<<endl;
que.pop();
}
return 0;
}

C++: #include<iostream>

#include<algorithm>
 
int main()
{
    int height(10);
 
    for(int i=0;i<10;++i)
    {
        std::cin >> height[i];
    }
 
    std::sort(height.begin(),height.end());
 
    std::cout << height[9] << '\n';
 
    std::cout << height[8] << '\n';
 
    std::cout << height[7] << '\n';
}

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

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

}

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

int main(){
    int hest[3]={0,0,0};
    int h;
    for(int i=0;i<10;i++){
        std::cin>>h;
        for(int j=0;j<3;j++){
            if(hest[j]<h){
                hest[j] = h;
                break;
            }
        }
    }

    for(int j=0;j<3;j++){
        std::cout<<hest[j]<<std::endl;
    }

    return 0;
}

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,greater<int>());
    for(int i=0;i<3;i++){
        cout << a[i] << endl;
    }
    return 0;
}

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

int main(){

	int a[100];
	int list[4]={0,0,0,0};


	for(int i=1;i<10;i++){

		cin>>a[i];

		if(list[1]<a[i]){
			list[3]=list[2];
			list[2]=list[1];
			list[1]=a[i];
		}

		else if(list[2]<a[i]){
			list[3]=list[2];
			list[2]=a[i];
		}

		else if(list[3]<a[i]){
			list[3]=a[i];
		}

	}
	
	for(int j=1;j<=3;j++){
			cout<<list[j]<<endl;
	}

	return 0;
}

C++: #include <iostream>
using namespace std;
int main(int argc, const char * argv[]) {
    int mountain[10] = {0};
    int i, k, index;
    int height = 0;
    for (i = 0; i < 10; i++) {
        cin >> mountain[i];
    }
    for (i = 0; i < 3; i++) {
        height = 0;
        for (k = 0; k < 10; k++) {
            if (height < mountain[k]) {
                height = mountain[k];
                index = k;
            }
        }
        cout << height <<endl;
        mountain[index] = 0;
    }
    return 0;
}

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

int main()
{
	int top[3];
	memset(top, 0, sizeof(top));
	int h;
	while (scanf("%d", &h) != EOF)
	{
		for (int i = 0; i < 3; ++i)
		{
			if (top[i] < h)
			{
				for (int j = 2; j > i; --j)
					top[j] = top[j-1];
				top[i] = h;
				break;
			}
		}
	}
	for (int i = 0; i < 3; ++i)
		printf("%d\n", top[i]);

	return 0;
}

C++: #include <bits/stdc++.h>

using namespace std;

#define LOG(...) fprintf(stderr, __VA_ARGS__)
//#define LOG(...)
#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 ALL(a) (a).begin(), (a).end()
#define RALL(a) (a).rbegin(), (a).rend()
#define EXIST(s, e) ((s).find(e)!=(s).end())
#define SORT(c) sort(ALL(c))
#define RSORT(c) sort(RALL(c))
#define SQ(n) (n) * (n)

typedef long long ll;
typedef unsigned long long ull;
typedef vector<bool> vb;
typedef vector<int> vi;
typedef vector<ll> vll;
typedef vector<vb> vvb;
typedef vector<vi> vvi;
typedef vector<vll> vvll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;

int main() {
  vi mt(10);
  REP(i, 10) cin >> mt[i];
  RSORT(mt);
  REP(i, 3) cout << mt[i] << endl;
}

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

int main(){
	std::vector<int> height;
	for (int i = 0; i < 10; i++)
	{
		int scan_num;
		std::cin >> scan_num;
		height.push_back(scan_num);
	}
	std::sort(height.begin(), height.end());
	for (int i = 10; i > 10 - 3; i--)
	{
		std::cout << height[i-1] << '\n';
	}
	return 0;

}