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<vector>
#include<algorithm>
#include<functional>
using namespace std;
int main()
{
	int n;
	vector<int> mountain;
	while( cin >> n )
		mountain.push_back(n);
	sort( mountain.begin(), mountain.end(), greater<int>() );
	for(n=0; n<3; n++)
		cout << mountain[n] << endl;
}

C++: #include <iostream>
#include <stdio.h>
#include <vector>
#include <algorithm>
#include <math.h>
#include <utility>

using namespace std;

#define FOR(i,k,n) for(int i = (k); i < (n); i++)
#define REP(i,n) FOR(i,0,n)

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

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

int main(){
	int array[10];
	int work;
    for(int i=0; i<10; i++){
       cin >> array[i];
	}
	
	for(int i=0; i<10; i++){
       for(int j=10-1; j>i; j--){
			if(array[j] > array[j-1]){
				work = array[j];
				array[j] = array[j-1];
				array[j-1] = work;
			}
		}
	}
			
	for(int i=0; i<3; i++){
       cout << array[i] << "\n";
	}
	
    return 0;
}

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

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

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

  cout<<h[0]<<h[1]<<h[2]<<endl;
  cout<<endl;
  return 0;
}

C++: #include <algorithm>
#include <stdio.h>
using namespace std;


int main()
{
	int i[10];
	cin >> i;
	sort(i, i+10);
	cout << i[1] << endl;
	cout << i[2] << endl;
	cout << i[3] << endl;

	return 0;
}

C++: #include <stdio.h>
#include <math.h>
#include <iostream>
using namespace std;

int main(void){
	int x[10],top[3];
	int i;

	for(i=0;i<3;i++){
		top[i] = 0;
	}
	std::cin >>x[0]>>x[1]>>x[2]>>x[3]>>x[4]>>x[5]>>x[6]>>x[7]>>x[8]>>x[9];
	for(i=0;i<10;i++){
		if(top[0] < x[i]){
			top[2] = top[1];
			top[1] = top[0];
			top[0] = x[i];
		}
	}

	std::cout << top[0] << "\n" << top[1] << "\n" <<top[2] << "\n";
	return 0;
}

C++: #include<iostream>
using namespace std;
int main(void){
  int high,max1=0,max2=0,max3=0;
  for(int i=1;i<=10;i++){
    cin >> high;
    if(high>max1){
      max3=max2;
      max2=max1;
      max1=high;
    }
    else if(max2<high && high<=max1){
      max3=max2;
      max2=high;
    }
    else if(max3<high && high<=max2){
      max3=high;
    }
  }
  cout << max1 << endl << max2 << endl << max3 << endl;
}

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

const int N = 10;

void insertionSort(int *a, int n) {
  int v, j;
  for (int i=0; i<n; i++) {
    v = a[i];
    j = i - 1;
    while (0<=j && v<a[j]) {
      a[j+1] = a[j];
      j--;
    }
    a[j+1] = v;

    // for (int k=0; k<n; k++) {
    //   cout << a[k];
    //   if (k < n - 1) cout << " ";
    // }
    // cout << endl;
  }
}

int main() {
  int height[N];
  for (int i=0;i<N;i++) {
  	cin >> height[i];
  }
  insertionSort(height, N);

  int h = 3;
  for (int i=N-1;i>N-h-1;i--) {
  	cout << height[i] << endl;
  }

  return 0;
}

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

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

C++: #include<iostream>
#include <fstream>
#include <stdio.h>
#include <stdlib.h>
#define _USE_MATH_DEFINES
#include <math.h>
#include<string>
#include<vector>
#include<cmath>
#include<stack>
#include<queue>
#include<sstream>
#include<algorithm>
#include<map>
#include<complex>
using namespace std;


#define li			long long int
#define rep(i,to)	for(int i=0;i<((int)(to));i++)
#define repp(i,start,to)	for(int i=(int)(start);i<((int)(to));i++)
#define pb			push_back
#define sz(v)		((li)(v).size())
#define bgn(v)		((v).begin())
#define eend(v)		((v).end())
#define allof(v)	(v).begin(), (v).end()
#define dodp(v,n)		memset(v,(li)n,sizeof(v))
#define bit(n)		(1ll<<(li)(n))
#define mp(a,b)		make_pair(a,b)
#define rin	rep(i,n)
#define EPS 1e-10
#define ETOL 1e-8
#define MOD 1000000007
#define p2(a,b)		cout<<a<<"\t"<<b<<endl
#define p3(a,b,c)		cout<<a<<"\t"<<b<<"\t"<<c<<endl


int main(){
	vector<li> a(10);
	rep(i,10)cin>>a[i];
	
	sort(allof(a));
	
	cout<<a[9]<<endl;
	cout<<a[8]<<endl;
	cout<<a[7]<<endl;
	
	return 0;
}

C++: #include<stdio.h>
#include<iostream>
using namespace std;
int main(){
	int a = 0,b=0;
	for (int i = 0; i < 10;i++){
		cin >> a;
		if (a>b){
			a = b;
		}

	}
	return 0;
}

C++: #include<stdio.h>
int main(void)
{
	int a,b,max=0,max2=0,max3=0;
	for (a = 1; a <= 10; a++) {
		scanf("%d",&b);
		if (b > max){
			max=b;
		}
		else if (b>max2){
			max2=b;
		}
		else if(b>max3){
			b=max3;
		}
		printf("%d\n %d\n %d\n",max,max2,max3);
		return 0;
	}
}

C++: #include <stdio.h>
int main(void) {
int i,j,d[10];
for(i=0;i<10;i++) scanf("%d",&d[i]);
for(i=0;i<9;i++) for(j=i+1;j<10;j++)
	if(d[i]<d[j]) d[i]+=d[j],d[j]=d[i]-d[j],d[i]-=d[j];
printf("%d\n%d\n%d\n",d[0],d[1],d[2]);
return 0;
}

C++: #include<iostream>
#include<algorithm>
using namespace std;
int main()
{
	int a[10],i;
	for(i=0;i<10;i++)cin>>a[i];
	sort(a,a+10);
	for(i=9;i>6;i--)cout<<a[i]<<endl;
	return 0;
}

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

int main(int argc, const char * argv[]) {
    
    vector<int> heights(10);
    for (int i=0; i<10; i++){
        cin >> heights[i];
    }
    sort(heights.begin(), heights.end(), greater<int>());
    
    for (int i=0; i<3; i++){
        cout << heights[i] << endl;
    }
    
    return 0;
}

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

int main(void)
{
    vector <int> a;
    int b;

    for (int i = 0; i < 10; i++){
    cin>>b;
a.push_back(b);
}

while(1);

sort(a.begin(), a.end());
cout << a[9] << endl << a[8] << endl << a[7] << endl;

return 0;
}

C++: #include <iostream>

int main()
{
        int best[] = {0, 0, 0};
        int t = 0;
        for(int i = 0; i < 10; ++i)
        {
                std::cin >> t;
                for(int j = 0; j < 3; ++j)
                        if(t > best[j])
                        {
                                for(int k = 2; k > j; --k)
                                        best[k] = best[k - 1];
                                best[j] = t;
                                break;
                        }
        }
        for(int i = 0; i < 3; ++i)
                std::cout << best[i] << std::endl;
        return 0;
}

C++: #include <stdio.h>

int main() {
    
    int n = 0, m = 0, l = 0;
    
    int i, tmp;
    for (i = 1; i <= 10; i++) {
      
        scanf("%d", &tmp);
        if (n < tmp) l = m; m = n; n = tmp; continue;
        if (m < tmp) l = m; m = tmp; continue;
        if (l < tmp) l = tmp; continue;
        
    }
    
    printf("%d\n%d\n%d\n", n, m, l);
    
    return 0;
}