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>
#include <vector>
#include <algorithm>
using namespace std;

int main() {
	vector<int> vec(10);
	for (int i = 0; i < 10; i++) {
		cin >> vec[i];
	}
	sort(vec.begin(), vec.end());
	reverse(vec.begin(), vec.end());
	for (int i = 0; i < 3; i++) {
		cout << vec[i] << endl;
	}
	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(t);
}
for(int i=0;i<3;i++)
{
cout<<que.top()<<endl;
que.pop();
}
return 0;
}

C++: #include <stdio.h>


int main(){
	int h[3]={0,0,0};
	int c,i;
	
	for(i=0;i<10;i++){
		scanf("%d",&c);
		if(c>h[0]){
			h[2]=h[1];
			h[1]=h[0];
			h[0]=c;
		}else if(c>h[1]){
			h[2]=h[1];
			h[1]=c;
		}else if(c>h[2]){
			h[2]=c;
		}
	}
	
	for(i=0;i<3;i++){
		printf("%d\n",h[i]);
	}
}

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

using namespace std;

int main() {
  int h[10];
  for (int i=0; i<10; ++i) {
    cin >> h[i];
  }
  sort(begin(h), end(h));
  cout << h[9] << "\n";
  cout << h[8] << "\n";
  cout << h[7] << "\n";
}

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

#define BOGO 10

using namespace std;

int main()
{
	int arr[BOGO];
	srand(static_cast<unsigned int>(time(NULL)));
	
	for(int i = 0; i < BOGO; i++){
		cin >> arr[i];
	}
	
	for(;;){
		
		/**
		for(int j = 0; j < BOGO; j++){
			cout << arr[j] << flush;
		}
		cout << endl;
		/**/
		
		bool found = true;
		for(int j = 0; j < BOGO-1; j++){
			if(arr[j] > arr[j+1]){
				found = false;
				break;
			}
		}
		
		if(found){
			break;
		}
		random_shuffle(arr, arr+BOGO);
	}
	cout << arr[9] << "\n" << arr[8] << "\n" << arr[7] << endl;
}

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

int main()
{
	int array[10];
	for (int i = 0; i < 10; i++) {
		cin >> array[i];
	}
	for (int j = 9; j != 6; j--) {
		for (int i = 0; i < j; i++) {
			if (array[i] > array[i+1]) {
				int spare = array[i];
				array[i] = array[i+1];
				array[i+1] = spare;
			}
		}
		cout << array[j] << endl;
	}
}

C++: #include <iostream>

int main()
{
    int h[10];

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

    for (int i = 0; i < 10; i++)
    {
        for (int n = 0; n < 9; n++)
        {
            if (h[n] < h[n+1])
            {
                std::swap(h[n], h[n+1]);
            }
        }
    }
    
    for (int i = 0; i < 3; i++)
    {
        std::cout << h[i] << std::endl;
    }

    return 0;
}

C++: #include <stdio.h>

int main(void) {
	int n;
	n=0;
	
	if (n<0 && n>10000)
	{
		return 1;
	}
	
	for(n=0; n<10 ;n++)
	{
		printf("height of mountain %d\n", n);
	}
	
	return 0;
}

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

int main() {

	int a = 0, b = 0, c = 0, x;

	while ( ~scanf( "%d", &x ) ) {

		if ( x > a )
			c = b, b = a, a = x;
		else if ( x > b )
			c = b, b = x;
		else if ( x > c )
			c = x;
	}

	printf( "%d\n%d\n%d\n", a, b, c );

	return 0;
}

C++: import java.util.*;

public class Main {
    public static void main(String[] args) {
	Scanner s = new Scanner(System.in);
	int[] dat = new int[10];
	for(int tc = 0; tc < 10; ++tc) {
	    dat[tc] = s.nextInt();
	}
	Arrays.sort(dat);
	for(int i = 0; i < 3; ++i) {
	    System.out.println(dat[9-i]);
	}
    }
}

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

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

  list<int> ls;

  int height = 0;
  for (size_t i = 0; i < input_num; i++) {
    cin >> height;
    ls.push_back(height);
  }

  ls.sort(std::greater<int>());

  auto it = ls.begin();
  for (int i = 0; i < 3; i++) {
    cout << *it << endl;
    it++;
  }

  return 0;
}

C++: #include <iostream>
#define N 10

using namespace std;

void swap(int& a, int& b){
	int tmp = a;
	a = b;
	b = tmp;
}

void bubble_sort(int mountain[N]){
	for (int i=0; i<N; ++i){
		for (int j=0; j<(N-i); ++j){
			if (mountain[j] < mountain[j+1]){
				swap(mountain[j], mountain[j+1]);
			}
		}
	}
}

int main(void){
	int mountain[N];
	for (int i=0; i<N; ++i){
		int tmp;
		//do{
			cin >> tmp;
			/*if ((tmp<0) || (10000 < tmp)){
				return -1;
			}*/
		//}while ((tmp<0) || (10000 < tmp));
		mountain[i] = tmp;
	}
	bubble_sort(mountain);
	//cout << "output" << endl;
	for (int i=0; i<3; ++i){
		cout << mountain[i] << endl;
	}
	return 0;
}

C++: #include <iostream>
#include <cstdio>
#include <algorithm>
#include <cassert>
#include <vector>
#include <string>
#include <cmath>
#include <map> 
#include <sstream>
#include <cstdio>
#include <complex>
#include <cstring>
using namespace std;
 
const int MAX= 10000100;

#define loop(i,a,b) for(int i = a ; i < b ; i ++)
#define rep(i,a) loop(i,0,a)
#define all(a) (a).begin(),(a).end()
#define ll long long int
#define gcd(a,b) __gcd(a,b)
#define pb(a) push_back(a)
int GCD(int a, int b) {if(!b) return a; return gcd(b, a%b);}
int lcm(int a, int b) {return a*b / gcd(a, b);}

int main(void){
  int a[10];
  rep(i,10)cin>>a[i];
  sort(a,a+10,greater<int>());
  rep(i,3)cout<<a[i]<<endl;
}

C++: #include<bits/stdc++.h>
using namespace std;
int a[11];
int main(){
	for(int i=1;i<=10;i++){
		scanf("%d",&a[i]);
	}
	sort(a+1,a+11);
	printf("%d\n%d\n%d",a[10],a[9],a[8]);
}

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

int main(){
	int m,max=0,cen=-1,min=-2;
	cin >> m;
	max=m;
	cen=m;
	min=m;
	for(int i=1;i<10;i++){
		cin >> m;
		if(max<m){
			min=cen;
			cen=max;
			max=m;
		}
		else if(cen<=m){
			min=cen;
			cen=m;
		}
		else if(min<=m) min=m;
	}
	cout << max << endl;
	cout << cen << endl;
	cout << min << endl;

		return 0;
}

C++: #include<stdio.h>

void swap(int *x,int *y){
        int temp;

        temp=*x;
        *x=*y;
        *y=temp;

}

int main(void){
        int i,j,k;
        int height[10];

        i=0;

        while(scanf("%d",&height[i])==1){
                i++;
                if(i==10) break;
        }


        for(j=0;j<10;j++){
                if(height[j]<0 || height[j]>10000){
                        height[j]=0;
                }
        }



        for(i=0;i<10;i++){
                for(j=0;j<10;j++){
                        if(height[i]<height[j]){
                        swap(&height[i],&height[j]);
                        }
                }
        }       /*sort*/

        printf("\n");

        k=9;


        while(1){
                printf("%d\n",height[k]);
                k--;
                if(k==6) break;
        }




        return 0;
}

C++: #include <iostream>
#define N 10

using namespace std;

void swap(int& a, int& b){
	int tmp;
	if (a > b){
		tmp = a;
		a = b;
		b = tmp;
	}
}

void bubble(int mountain[N]){
	for (int i=0; i<(N-1); ++i){
		for (int j=i; j<(N-1); ++j){
			swap(mountain[j], mountain[j+1]);
		}
	}
}


int main(void){
	int mountain[N] = {0, };
	for (int i=0; i<N; ++i){
		cin >> mountain[i];
		if ((mountain[i] < 0) || (mountain[i] > 10000)){
			//cout << "Range out!" << endl;
			return -1;
		}
	}
	bubble(mountain);
	//cout << "output!" << endl;
	for (int i=9; i>=7; --i){
		cout << mountain[i] << endl;
	}
	return 0;
}

C++: #include<iostream>
#include<algorithm>
using namespace std;
int main(){
  int n[10];
  for(int i=0;i<10;i++){
    cin>>n[i];
  }
  sort(n,n+10);//昇順ソート
  for(int i=9;i>=7;i--){
    cout<<n[i]<<endl;
  }
}

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

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