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>

using namespace std;

int main(){
  int outHigh[3],inHigh[10];
  int where;
  outHigh[0]=0;
  outHigh[1]=0;
  outHigh[2]=0;
  
  for(int i = 0; i < 10; i++){
    cout << "height of mountain "<<i<<" (integer)  ";
    cin >> inHigh[i];
    cout <<endl;
    }
  
  for(int j = 0; j < 3; j++){
    for(int i = 0; i < 10; i++){
      if(outHigh[j] < inHigh[i]){
	outHigh[j] = inHigh[i];
	where = i;
      }	
    }
    inHigh[where] = 0;
  }
  
  for(int i = 0; i < 3; i++){
    cout << outHigh[i]<<endl;
  }
  
}

C++: #include<bits/stdc++.h>
using namespace std;
int main(){
int a[10];
for(int i =0; i < 10; i++){
cin >> a[i];
}
sort( a, a + 10, greater<int>());
for(int j = 0; j < 3; j++){
cout << a[j] << endl;
}
return 0;
}

C++: #include <iostream>

using namespace std;

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

    for(int i=1; i<=10;  i++){
        cin>>n;
        if(n>a){
            c=b;
            b=a;
            a=n;
        }
        else if(n>b){
            c=b;
            b=n;
        }
        else if(n>c){
            c=n;
        }
    }
    cout<<a<<endl<<b<<endl<<c;
    return 0;
}

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

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

int main(){
	int height[10];
    for (int i = 0; i < 10; i++)
		cin >> height[i];
	sort(height, height + 10);
	cout << height[7] << '\n';
	cout << height[8] << '\n';
	cout << height[9] << '\n';
    return 0;
}

C++: #include<iostream>
#include<stdio.h>
#include<algorithm>
using namespace std;
int main()
{
	int m[10];
   for(int i=0;i<10;++i)
   {
	   cin>>m[i];
   }
   sort(&m[0],&m[9]+1);
   cout<<m[8]<<endl<<m[9]<<endl<<m[7]<<endl;

   return 0;
}