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;

void swap(int &x, int &y)
{
    int tmp = x;
    x = y;
    y = tmp;
}

int main(void){

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

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

	max1 = a[1];

	for (int i=2; i<11; i++){
		if (max1 < a[i]){
			swap(max1,a[i]);
		}
	}
	max2 = a[2];

	for (int i=3; i<11; i++){
		if (max2 < a[i]){
			swap(max2,a[i]);
		}
	}
	max3 = a[3];

	for (int i=4; i<11; 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 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;
            }
        }
    }

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

    return 0;
}

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

using namespace std;

int main(){
	vector<int> vc;
	int n;

	while(cin >> n){
		vc.push_back(n);
	}

	sort(vc.begin(), vc.end(), greater<int>());

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

C++: #include <stdio.h>
#include <algorithm>
using namespace std;
int main(){
	const int N=10;
	int height[N];
	for(int i=0;i<10;i++){
		scanf("%d",&height[i]);
	}
	sort(height,height+N);
	reverse(height,height+N);
	for(int j=0;j<3;j++){
		printf("%d\n",height[j]);
	}
	return 0;
}

C++: #include <iostream>
using namespace std;
int main(){
    int a[10];
    for(int i=0; i<10; i++){
            cout<<"Height of mountain "<<i+1<<" ";
        cin>>a[i];
        cout<<endl;
    }
    for(int i=0; i<10; i++)
        for(int j=0; j<9-i; j++)
            if(a[j]<a[j+1])
                swap(a[j],a[j+1]);

        cout<<"Height of 1st mountain "<<a[2]<<endl;
        cout<<"Height of 2nd mountain "<<a[1]<<endl;
        cout<<"Height of 3rd mountain "<<a[0];
        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 <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>
#include <algorithm>
using namespace std;

int main() {
	int m[10];
	for(int i=0; i<10; 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(){
int i;
int height[10];
int temp, flag;
for(i = 0; i < 10; i++){
scanf("%d", &height[i]);
}
do{
flag = 0;
for(i = 0; i < 9; i++){
if(height[i] > height[i + 1]){
flag = 1;
temp = height[i + 1];
height[i + 1] = height[i];
height[i] = temp;
}
}
}while(flag);
printf("%d\n%d\n%d\n", height[9], height[8], height[7]);
return 0;
}

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

using namespace std;

const int numOfMountain = 10;

int main(int argc, char** argv){
    int mountainBuf;
    vector<int> mountains;

    for(int i = 0; i <= numOfMountain; i++) {
        mountainBuf = atoi(argv[i]);
        mountains.push_back(mountainBuf);
    }

    sort(mountains.begin(), mountains.end());

    auto out = mountains.end();
    for(int i = 0; i < 3; i++) {
        out--;
        cout << *out << endl;
    }

    return 0;
}

C++: #include<cstdio>
#include<cstdlib>
#include<iostream>
using namespace std;
int main()
{
	int a[15],x=0;
	for(int i=1;i<=10;i++)
	{
		scanf("%d",&a[i]);

	}
	for(int i=1;i<=9;i++)
	{
		for(int q=i+1;q<=10;q++)
		{
			if(a[i]<a[q])
			{
				x=a[i];
				a[i]=a[q];
				a[q]=x;
			}
			
		}
	}
	printf("%d\n%d\n%d\n",a[1],a[2],a[3]);
	return 0;
}

C++: #include<iostream>
#include<string>
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[j]>a[j-1]){
        int t=a[j];
        a[j]=a[j-1];
        a[j-1]=t;
       }
      }
    }
    cout<<a[0]<<endl;
    cout<<a[1]<<endl;
    cout<<a[2]<<endl;
    return 0;
}

C++: #include <cstdio>
#include <algorithm>
 
using namespace std;
 
int main(void){
  int i,array[10];
 
  for(i=0;i<10;i++)  scanf("%d",&array[i]);
  sort(array,array+10);
  for(i=9;i>=7;i++)  printf("%d\n",array[i]);
 
  return 0;
}

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

#define BOGO 10

using namespace std;

bool is_sorted(vector<int> arr, int size)
{
	bool sorted = true;
	for(int i = 0; i < size; i++){
		if(!(arr[i] <= arr[i+1])){
			sorted = false;
		}
	}
	
	return sorted;
}

int main()
{
	vector<int> arr(BOGO);
	
	for(int i = 0; i < BOGO; i++){
		cin >> arr[i];
	}
	
	for(;;){
		if(is_sorted(arr, arr.size())){
			break;
		}
		random_shuffle(arr.begin(), arr.end());
	}
	
	cout << arr[9] << "\n" << arr[8] << "\n" << arr[7] << endl;
}

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

int main()
{
	std::vector<int> high(10);
	int h;

	for(int i=0;i<10;++i)
	{
		std::cin >> h;
		high[i] = h;
	}

	std::sort(high.begin(),high.end());

	for(size_t i=high.size()-1;i>6;--i)
	{
		std::cout << high[i] << '\n';
	}


}

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

using namespace std;

int main(int argc, char const* argv[])
{
	int hoge[10];

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

	sort( hoge, hoge + 10, greater<int>() );

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

	
	return 0;
}

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

int main()
{
	set<int> s;
	for(int i=0;i<10;i++){
		int in;
		cin >> in;
		s.insert(in);
	}
	
	set<int>::iterator it = s.end();
	--it;
	cout << endl;
	for(int i=0;i<3;i++){
		cout << *it << endl;
		--it;
	}
	return 0;
}

C++: #include<stdio.h>

int main(void)
{
	int high[10]={1819,2003,876,2840,1723,1673,3776,2848,1592,922};
	int x,max=0,time;


	for(time=1;time<=3;time++)
	{
		for(x=0;x<10;x++)
		{
			if(max<high[x])
			{
				max=high[x];
			}
		}
		for(x=0;x<10;x++)
		{
			if(max==high[x])
			{
				printf("%d\n",high[x]);
				high[x]=0;
			}
		}
	}

	return 0;
}

C++: #include <iostream>
#include <stdio.h>
#include <stdlib.h>
#define N 10
int main(int argc, const char * argv[])
{
    int x=0;
    int max1=-1;
    int max2=-2;
    int max3=-3;
    
    for(int j=0; j<N; j++){
        scanf("%d\n",&x);
        if(max1<=x){
            max3=max2;
            max2=max1;
            max1=x;
        }else if(max2<=x){
            max3=max2;
            max2=x;
        }else if(max3<=x){
            max3=x;
        }
    }
    printf("%d\n",max1);
    printf("%d\n",max2);
    printf("%d\n",max3);
}