Go: package main

import (
	"fmt"
	"sort"
)

func main() {
	mountains := make([]int, 10, 10)

	for i := 0; i < 10; i++ {
		fmt.Scan(&mountains[i])
	}

	sort.Sort(sort.Reverse(sort.IntSlice(mountains)))

	for i := 0; i < 3; i++ {
		fmt.Println(mountains[i])
	}
}

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

int main(){
    int temp;
    int key=-1;
    int data[3]={0};
    for(int i=0;i<10;i++){
        cin>>temp;
        for(int j=0;j<3;j++){
            if(temp>data[j])
            key=j;
        }
        if(key>=0){
        if(key>=1)
        for(int i=0;i<key;i++){
            data[i]=data[i+1];
        }
            data[key]=temp;
            key=-1;
        }
    }
    for(int i=2;i>-1;i--){
        cout<<data[i]<<endl;
    }
        return 0;
}

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

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

C++: #import<cstdio>
#import<deque>
#import<algorithm>
using namespace std;main(){int n,i;deque<int> h;for(;~scanf("%d",&n);)h.push_back(n);sort(h.begin(),h.end());for(i=9;i>6;i--)printf("%d\n",h[i]);}

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

int main(){
	int a=0,b=0,c=0,x;

	for(int i=0;i<=9;i++){
		cin >> x;

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

	cout << a << endl;
	cout << b << endl;
	cout << c << endl;

	return 0;
}

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

int main()
{
    int h;
    int max1 = 0, max2 = 0, max3 = 0;
    while (cin >> h)
    {
	if (max1 <= h)
	{
	    max3 = max2; max2 = max1; max1 = h;
	}
	else if (max2 <= h)
	{
	    max3 = max2; max2 = h;
	}
	else if (max3 <= h)
	{
	    max3 = h;
	}
    }
    cout << max1 << endl;
    cout << max2 << endl;
    cout << max3 << endl;
    return 0;
}

C++: #include<iostream>
using namespace std;
int a[20];

void insert(int a[])
    {
        int i,j,key;
        for(j=2;j<=10;j++)
        {
            key=a[j];
            i=j-1;
            while(i>0&&a[i]>key)
            {
                a[i+1]=a[i];
                i=i-1;
            }
            a[i+1]=key;
        }
    }
int main()
{
    int i;
    for(i=1;i<=10;i++)
    {
        cin>>a[i];
    }
    insert(a);
    for(i=10;i>=8;i--)
    {
        cout<<a[i]<<endl;
    }
    return 0;
}

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

int main() {
    
    // 1. input.
    int a[10];
    for(int i = 0; i < 10; i++) cin >> a[i];
    
    // 2. output answer.
    sort(a, a + 10, greater<int>());
    for(int i = 0; i < 3; i++) cout << a[i] << endl;
    
    return 0;
    
}

C++: #include<iostream>
#include<vector>
#include<algorithm>
using namespace std;
  
int main(){
    vector<int> h();
    int in{};
    for(int i=0;i<10;i++){
        cin>>in;
        h.push_back(in);
    }
    sort(h.begin(),h.end());
    cout<<h[9]<<endl;cout<<h[8]<<endl;cout<<h[7]<<endl;
    return 0;
}

C++: #include<iostream>
#include<vector>
std::vector<int> qsort(std::vector<int> xs);

int main(){
	std::vector<int> vec(10);
	for(int i=0;i<10;i++){
		std::cin>>vec[i];
	}
	qsort(vec);
	std::cout<<vec[0]<<vec[1]<<vec[2]<<std::endl;
	return 0;
}

std::vector<int> qsort(std::vector<int> xs){
	if(xs.empty()){
		return xs;
	}else{
		int x=xs[0];
		std::vector<int> left;
		std::vector<int> right;
		for(int i=1;i<xs.size();i++){
			if(xs[i]>x){
				left.push_back(xs[i]);
			}
			if(xs[i]<=x){
				right.push_back(xs[i]);
			}
		}
		left=qsort(left);
		right=qsort(right);
		left.push_back(x);
		left.insert(left.end(),right.begin(),right.end());
		return left;
	}
}

C++: #include<stdio.h>
# define N 10

int main(){
    int i,j,t,d[N];
    for(i=0;i<N;scanf("%d",&d[i]),i++);
    for(i=0;i<N-1;i++)
        for(j=N-1;j>i;j--)
            if(d[j-1]>d[j])
                {t=d[j-1]; d[j-1]=d[j]; d[j]=t;}
    for(i=N-1;i>N-4;printf("%d\n",d[i]),i--);         
    return 0;
}

C++: #include <iostream>
#include <stdlib.h>
using namespace std;
int comp(const void *value1, const void *value2){
    return *(const int *)value1 - *(const int *)value2;
}
int main() {
  int height[10];
  for(int i=0; i<10; i++) cin >> height[i];
  qsort(height, 10, sizeof(int), comp);
  cout << height[9] << "\n" << height[8] << "\n" << height[7] << endl;
  return 0;
}

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

int M[10];

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

	for(int j = 0; j < 9; ++j){
	for(int i = 0; i <9-j; ++i){
		if(M[i] <= M[i+1]){
			k = M[i];
			M[i] = M[i+1];
			M[i+1] = k;
		}
	}
	}

	for(int i = 0; i <3; ++i){
		cout << M[i] << '\n';
	}
	

}

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

vector<int> v;

int main(){
	int n;
	for(int i = 0; i < 10; i++){
		cin >> n;
		v.push_back(n);
	}
	
	sort(v.begin(), v.end());
	reverse(v.begin(), v.end());
	
	for(int i = 0; i < 3; i++)cout << v[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];
	}
	
	int max = 0;
	
	for(int i = 0; i < 9; i++)
	{
		for(int j = i+1; j < 10; j++)
		{
			if(n[i] < n[j]) swap(n[i], n[j]);
		}
	}
	
	cout << n[0] << endl;
	cout << n[1] << endl;
	cout << n[2] << endl;
	
	return 0;
}

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

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

C++: #include <iostream>

using namespace std;

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

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

int main(void) {
    std::priority_queue<u_int> heights;

    for (u_int h, i = 0; i < 10; ++i) {
        std::cin >> h;
        heights.push(h);
    }

    for (u_int i = 0; i < 3; ++i) {
        std::cout << heights.top() << std::endl;
        heights.pop();
    }

    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 a[3] = {-1, -1, -1};
int n;


    while(!cin.eof()) {

    cin >> n;

    if (n > a[0]) {
        a[2] = a[1];
        a[1] = a[0];
        a[0] = n;

    }

    else if (n < a[0] && n > a[1]) {
        a[2] = a[1];
        a[1] = n;
    }

    else if (n < a[1] && n > a[2]) {
        a[2] = n;
    }

    }

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


    return 0;


}

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

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

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

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