Go: package main

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

func main() {
	scanner := bufio.NewScanner(os.Stdin)
	counter := 0
	var mountain []int
	for scanner.Scan() {
		i, err := strconv.Atoi(scanner.Text())
		if err != nil {
			break
		}
		mountain = append(mountain, i)
		counter++
		if counter == 10 {
			break
		}

	}
	sort.Ints(mountain)
	fmt.Println(mountain[9])
	fmt.Println(mountain[8])
	fmt.Println(mountain[7])
}

C++: #include <iostream>
using namespace std;
int main(){
	int a[10];
	for(int i=0;i<10;i++){
		cin>>a[i];
	}
	for(int s=0;s<10-1;s++){
		for(int t=s+1;t<10;t++){
			if(a[t]>a[s]){
				int p=a[t];
				a[t]=a[s];
				a[s]=p;
			}
		}
	}
	for(int j=0;j<3;j++){
		cout<<a[j]<<endl;
	}
}

C++: #include<stdio.h>
int main(void) {
	int a, b, c[12],top=0,second=0,thread=0;
	for (int i = 1; i <= 10; i++)
	{
		scanf("%d", &c[i]);
		if (c[i]>=top)
		{
			second = top;
			top = c[i];
		}
		else
		{
			if (c[i]>=second)
			{
				thread = second;
				second = c[i];
			}
			else
			{
				if (c[i]>thread)
				{
					thread = c[i];
				}
			}
		}
	}
	printf("%d\n%d\n%d\n", top, second, thread);
	return 0;
}

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

using namespace std;

int main()
{
    vector<int> a(10);
    for (int i = 0; i < 10; ++i) cin >> a[i];
    sort(a.begin(), a.end());
    for (int i = 0; i < 3; ++i) cout << a[i] << endl;
    return 0;
}

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++: import java.util.*;

public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    List<Integer> l = new ArrayList<Integer>();
    for (int i = 0; i < 10; i++) {
      int t = sc.nextInt();
      l.add(t);
    }
    
    Collections.sort(l);
    Collections.reverse(l);
    for (int i = 0; i < 3; i++) {
      System.out.println(l.get(i));
    }
  }
};

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

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

C++: #include <stdio.h>
#include <algorithm>
using namespace std;
int main(){
int a[10];
for(int 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]);
}

C++: #include<iostream>
#include<array>
int main(void){
std::array<int,10> h;
int tmp;
for(auto& e : h){
std::cin>>e;
}
std::sort(h.begin(),h.end());
for(int i=0;i<3;i++){
std::cout<<h[i]<<std::endl;
}

return 0;
}

C++: #include<stdio.h>

int main()
{
	int high[10] = {1819,2003,876,2876,1723,1673,3776,2848,1592,922};
	int cases
	
	for(int i=0;i<9;i++)
	{
		for(int j=i+1; j<10; j++)
		{
			if(high[i] < high[j])
			{
				cases = high[i];
				high[i] = high[j];
				high[j] = cases;
			}
		}
	}
	
	printf("%d",high[0]);
	printf("%d",high[1]);
	printf("%d",high[2]);
	
	return 0;
}

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

int main(){
    int i,mount_height[10];
    int no_1=0;
    int no_2=0;
    int no_3=0;

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

    for(i=0;i<10;i++){
        if(mount_height[i]>no_1){
            no_2=no_1;
            no_1=mount_height[i];
        }
        else if(mount_height[i]>no_2){
            no_3=no_2;
            no_2=mount_height[i];
        }
    }

    cout<<no_1<<"\n"<<no_2<<"\n"<<no_3<<"\n";

    return 0;
}

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

using namespace std;

int main() {
	priority_queue<int, vector<int>, less<int> > q;
	int num;
	while (cin >> num) {
		q.push(num);
	}
	for (int i = 0; i < 3; i++) {
		cout << q.top() << endl;
		q.pop();
	}
	return 0;
}

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

int main(){

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

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

	max1 = a[0];

	for (i=1; i<10; i++){
		if (max1 < a[i]){
			swap (max1,a[i]);
		}
	}
	max2 = a[1];

	for (i=2; i<10; i++){
		if (max2 < a[i]){
			swap (max2,a[i]);
		}
	}
	max3 = a[2];

	for (i=3; i<10; 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;
 
int main()
{
    int array[10];
    int i, j, tmp;
     
    for(i=0; i<10; i++){
        cin >> array[i];
    }
     
    for(i=0; i<9; i++){
        for(j=i+1; j<10; j++){
            if(array[i] < array[j]){
                tmp = array[i];
                array[i] = array[j];
                array[j] = tmp;
            }
        }
    }
     
    for(i=0; i<3; i++){
        cout << array[i] << "\n";
    }
     
    return 0;
}

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

#define rep(x,to) for(x=0;x<to;x++)
#define rep2(x,from,to) for(x=from;x<to;x++)

using namespace std;


int main(void){

int i;
vector<int> yama(10,0);
	rep(i,10) cin >> yama[i];
	sort(yama.begin(),yama.end(),greater<int>());
	rep(i,3) cout << yama[i] << endl;
	return 0;
}

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

int main()
{
    int x[10];
    for (unsigned int i = 0; i < (sizeof(x) / sizeof(int)); i++)
        cin >> x[i];
    int first = 0;
    for (unsigned int i = 0; i < (sizeof(x) / sizeof(int)); i++)
        if (x[i] > first)
            first = x[i];
    int second = 0;
    for (unsigned int i = 0; i < (sizeof(x) / sizeof(int)); i++)
        if (x[i] > second && first > x[i])
            second = x[i];
    int third = 0;
    for (unsigned int i = 0; i < (sizeof(x) / sizeof(int)); i++)
        if (x[i] > third && second > x[i])
            third = x[i];
    cout << first << endl;
    cout << second << endl;
    cout << third << endl;
}