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

int main()
{
    int height;
    vector<int> top3;

    while (cin >> height) {
        for (auto it = top3.begin(); it != top3.end(); it++) {
            if (height > *it) {
                it = top3.insert(it, height);
                break;
            }
        }
        if (top3.size() > 3)
            top3.pop_back();
        else if (top3.size() < 3)
            top3.push_back(height);
    }
    
    for (auto h: top3)
        cout << h << endl;

    return 0;
}

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

int Size = 10;

int main(void) {
    int height[Size];
    
    for(int i = 0; i < Size; ++i) {
        while(true) {
            cout << "No." << i + 1 << " : " << flush;
            cin >> height[i];
            if(height[i] > 0) {
                break;
            }
        }
    }
    sort(height, height + Size);
    
    cout << height[9] << endl
         << height[8] << endl
         << height[7] << endl;
}

C++: #include<iostream>
using namespace std;
int main() 
{
    int i=0; 
	int num[10]; 
	for(;i<10;i++)
	cin>>num[i]; 
	int temp=0,temp1=0,j=0,k=0; 
	for(;j<3;j++)
	 { 
	  for(i=0;i<10;i++) 
	   { 
	    temp1=temp; 
	    temp=temp<num[i]?
	    num[i]:temp;
		if(temp>temp1) 
		k=i; 
		} 
		cout<<num[k]<<endl; 
		temp=0; 
		num[k]=0; 
	 } 
	 return 0;
}

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

int main()
{
	int i, j, a[10];
	for(i=0;i<10;i++){
		scanf("%d", &a[i]);
	}
	sort(a,a+10);
	for(j=0;j<3;j++){
		printf("%d\n", a[9-j]);
	}
}

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

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

C++: #include <stdio.h>

int main()
{
	int vc[10];
	int i;
	int max=0,sec=0,thi=0;

	for(i=0;i<10;i++){
		scanf("%d",&vc[i]);
	}

	printf("\n");
	for(i=0;i<10;i++){
		if(max <= vc[i])
			max = vc[i];
	}

	for(i=0;i<10;i++){
		if(sec <= vc[i] && vc[i] < max)
			sec = vc[i];
	}

	for(i=0;i<10;i++){
		if(thi <= vc[i] && vc[i] < sec)
			thi = vc[i];
	}

	printf("%d\n%d\n%d\n",max,sec,thi);

	return 0;
}

C++: //http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=0001&lang=jp
#include <iostream>
#include <string>
#include <cmath>
#include <algorithm>
#include <vector>
#include <map>

using namespace std;


int main(){
	int n = 10;
	int a[n];
	for(int i=0; i<n; i++){
		cin >> a[i];
	}
	sort(a, a+n);
	printf("%d\n", a[9]);
	printf("%d\n", a[8]);
	printf("%d\n", a[7]);


	return 0;

}

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

int main()
{
	int iHigh[10];

	for( int i=0;i<10;i++ ){
		scanf("%d",&iHigh[i]);
	}

	sort( iHigh,iHigh+9,greater <int>() );

	for( int i=0;i<3;i++ ){
		printf("%d\n",iHigh[i]);
	}

	return 0;
}

C++: #include <iostream>
#include <math.h>
#include <string>
#include <algorithm>
#include <vector>
using namespace std;
int kaijo(int n){
	int ans = 1;
	if (n != 0){
		for (int i = 0; i < n; i++){
			ans *= (n - i);
		}
	}
	else{
		ans = 1;
	}
	return ans;
}

int main(){
	int a[10];
	int ans;
	int max1 = 0;
	int max2 = 0;
	int max3 = 0;

	for (int i = 0; i < 10; i++){
		cin >> a[i];
	}
	for (int i = 0; i < 10; i++){
		if (max1<a[i]){
			max1 = a[i];
		}
		
	}
	cout << max1 << endl;

	for (int i = 0; i < 10; i++){
		if (max2<a[i]&&a[i]!=max1){
			max2 = a[i];
		}

	}
	cout << max2 << endl;

	for (int i = 0; i < 10; i++){
		if (max3<a[i]&&a[i]<max2){
			max3 = a[i];
		}

	}
	cout << max3 << endl;
	return 0;
}

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

int a[10];

int main()
{
    for(int i=0;i<10;i++)
    {
        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;

main()
{ int x[10],t[3];
  int  s=0;
  for(int i=0;i<10;i++){
    cin>>x[i];
  }

  for(int k=0;k<3;k++){
    for(int j=0;j<10;j++){
      if(t[k]<x[j]){
        s=t[k];
        t[k]=x[j];
        x[j]=s;
      }
    }
  }
for(int e=0;e<3;e++){
    cout<<t[e]<<endl;
  }
return 0;
}

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

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

using namespace std;

const int numOfMountain = 10;

int main(int argc, char** argv){
    int mountainBuf;
    vector<int> mountains;

    for(int i = 0; i <= numOfMountain; i++) {
        mountainBuf = atoi(argv[i]);
        mountains.push_back(mountainBuf);
    }

    sort(mountains.begin(), mountains.end());

    vector<int>::iterator out = mountains.end();
    for(int i = 0; i < 3; i++) {
        out--;
        cout << *out << endl;
    }

    return 0;
}

C++: #include<iostream>
#include<string>
#include<algorithm>
#include<vector>
#include<cstdio>
#include<cstring>
#include<map>
using namespace std;
#define rep(i,n) for(int i=0;i<n;i++)
#define REP(n) rep(i,n)
#define all(n) n.begin(),n.end()
#define foreach(it,c) for(typeof(c.begin()) it=c.begin();it!=c.end();++it)

int main()
{
    vector<int> h; int t;

    REP(10) { cin >> t; h.push_back(t);}
    sort(all(h), greater<int >());

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

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

int main(){
    int *a = new int[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<cstdio>
#include<iostream>
#include<algorithm>
#define rep(i,n) for(int i=0;i<n;++i)
using namespace std;

int main() {
	int m[10];
	rep(i, 10)cin >> m[i];
	sort(m, m + 10);
	for (int i = 9; i >= 7; i--) {
		printf("%d\n", m[i]);
	}
	return 0;
}

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

using namespace std;

int xs[10];

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

	sort(xs, xs+10);
	reverse(xs, xs+10);
	for (int i = 0; i < 3; ++i)
		cout << xs[i] << endl;


	return 0;
}