Go: package main

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

func main() {
        fp := os.Stdin
        scanner := bufio.NewScanner(fp)
        var lst [3]int

        for scanner.Scan() {
                num, _ := strconv.Atoi(scanner.Text())
                if lst[0] < num {
                        lst[2] = lst[1]
                        lst[1] = lst[0]
                        lst[0] = num
                } else if lst[1] < num {
                        lst[2] = lst[1]
                        lst[1] = num
                } else if lst[2] < num {
                        lst[2] = num
                }
        }

        for _, i := range lst {
                fmt.Printf("%d\n", i)
        }
}

C++: #include <iostream>
#include <string>
#include <cstring>
#include <fstream>
#include <algorithm>
#include <iomanip>
#include <vector>
#include <stack>
#include <queue>
#include <deque>
#include <map>
#include <list>
#include <set>
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <bitset>
#include <functional>

using namespace std;

#define FOR(i,n) 		for(int(i)=0;(i)<(int)(n);(i)++)
#define FORN(i,a,b,c) 	for(int(i)=a;i<(int)(b);i+=(c))
#define RES(x,nilai)	memset(x,nilai,sizeof(x));
#define pb              push_back
#define mp              make_pair
#define INF				1000000000

typedef long long ll;
typedef pair<int, int> ii;
typedef vector<int> vi;
typedef vector<ii> vii;

inline string IS(int a){
    char x[100];
    sprintf(x,"%d",a); string s = x;
    return s;
}

inline int SI(string a){
    char x[100]; int res;
    strcpy(x,a.c_str()); sscanf(x,"%d",&res);
    return res;
}

//==============================================

bool cmp(int x,int y) {return x>y;}

int arr[100];

int main() {
	//freopen("in.txt","r",stdin);
	//freopen("13.txt","w",stdout);
	ios_base::sync_with_stdio(false); cin.tie(NULL);
	
	for(int i =0 ;i < 10; i++) cin >> arr[i];
	sort(arr,arr+10);
	cout << arr[9] << endl << arr[8] << endl << arr[7] << endl;
		
    return 0;
}

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

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

C++: #include<iostream>

using namespace std;

int main()
{
	int high[10] = { };
	int first = 0, second = 0, third = 0;
	
	for(int i = 0; i < 10; i++){
		cin >> high[i];
		
		if(first < high[i]){
			second = first;
			first = high[i];
		}
		else if(second < high[i]){
			third = second;
			second = high[i];
		}
		else if(third < high[i])
			third = high[i];
	}
	
	cout << first << endl << second << endl << third << endl;
	
	
	return 0;
}

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

int N;

int main(){
	N = 10;
	int t;
	int mh[N];
	
	for(int i=0; i<10; i++){
		cout << "height of mountain " << i+1 << " : ";
		cin >> t;
		if(t>=0 && t<=10000)
			mh[i]=t;
		else{
			i=i-1;
			cout << "over!\n";
		}
	}
	
	for(int i=0; i<10; i++){
		for(int j=i+1; j<10; j++){
			if(mh[i] < mh[j]){
				t = mh[i];
				mh[i] = mh[j];
				mh[j] = t;
			}
		}
	}
	
	cout << "----------------------\n";
	
	for(int i=0; i<3; i++)
		cout << "height of the " << i+1 << " mountain: " << mh[i] << "\n";
	
	return 0;
}

C++: #include <stdio.h>
#include <iostream>

using namespace std;

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

	for (int i = 1; i < 10; i++) {
		int v = H[i];
		int j = i - 1;
		while (j >= 0 && H[j] < v) {
			H[j + 1] = H[j];
			j--;
		}
		H[j + 1] = v;
	}

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

	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 m[10];

	for (int i = 0; i < 10; i++)cin >> m[11];

	stable_sort(m, m + 10);

	for (int i = 9; i > 6; i--) {
		cout << m[i] << endl;
	}
	return 0;
}

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

int main()
{
  int mount[11];
  for(int i=1; i<11; i++){
    cin >> mount[i];
  }

  for(int i=1; i<10; i++){
    for(int j=i+1; j<11; j++){
      if( mount[i] < mount[j] ){
	int temp;
	temp = mount[i];
	mount[i] = mount[j];
	mount[j] = temp;
      }
    }
  }

  cout << mount[1] << endl
       << mount[2] << endl
       << mount[3] << endl;
  return 0;
}

C++: #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> P;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define MOD (int) (1e9+7)
#define INF (int) 2e9

int main(){
    int a[10];
    rep(i, 10){
        cin >> a[i];
    }

    sort(a, a+10, greater<>());

    rep(i, 3){
        cout << a[i] << endl;
    }
    // printf("%d\n", N);
    return 0;
}

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

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

C++: #include <iostream>
#include <algorithm>
#include <string>
#include <vector>
using namespace std;
void insertionSort(int A[], int N);

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

void insertionSort(int A[], int N){
    int j, i, v;
    for(i = 1; i < N; i++){
        v = A[i];
        j = i - 1;
    while(j >= 0 && A[j] > v){
        A[j+1] = A[j];
        j--;
    }
    A[j+1] = v;
    }
}

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

int main()
{
	int top1 = 0, top2 = 0, top3 = 0;
	int temp;
	
	for (int i = 0; i < 10; i++) {
		cin >> temp;
		if (temp >= top1) {
			top3 = top2;
			top2 = top1;
			top1 = temp;
		} else if (temp >= top2) {
			top3 = top2;
			top2 = temp;
		} else if (temp >= top3) {
			top3 = temp;
		}
	}
	
	cout << top1 << "\n" << top2 << "\n" << top3 << "\n";
	return 0;
}

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

int main(){

int[3] top = {0,0,0};

while(cin.peek != EOF){
int h;
cin >> h;
if(h > top[2]){
top[2] = h;
if(h > top[1]){
top[2] = top[1];
top[1] = h;
if(h > top[0]){
top[1]=top[0];
top[0]=h;
}
}
}

}

return 0;
}

C++: #include <cstdio>
#include <algorithm>
#include <functional>

using namespace std;

int main(){
	
	int d[12];
	
	for(int i = 0;i < 10;i++){
		scanf("%d",&d[i]);
	}
	
	sort(d, d+10, greater<int>() );
	
	for(int i = 0;i < 3;i++){
		printf("%d\n",d[i]);
	}
	return 0;
	
	}

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

using namespace std;

int comp(const int *a, const int *b);

int main(void) {
	int hill[10];
	
	for(int i = 0; i < 10; i++) {
		cin >> hill[i];
	}
	
	qsort(hill, 10, sizeof(int), (int(*)(const void *, const void *))comp);
	
	cout << hill[9] << endl << hill[8] << endl << hill[7] << endl;
	
	return 0;
}

int comp(const int *a, const int *b) {
	if(*a < *b)				return -1;
	else if(*a == *b)		return  0;
	else					return  1;
}