Go: package main

import "fmt"

func main() {
	var height int
	topHeights := [5]int{}

	for i := 0; i < 10; i++ {
		fmt.Scan(&height)

		for j := 0; j < 3; j++ {
			if topHeights[j] < height {
				topHeights[j+2] = topHeights[j+1]
				topHeights[j+1] = topHeights[j]
				topHeights[j] = height
				break
			}
		}
	}

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

C++: #include<stdio.h>
#include<algorithm>
#include<functional> 

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

C++: #include <bits/stdc++.h>
using namespace std;
int main() {
  vector<int> v;
  int h;
  while (cin >> h) {
    v.push_back(h);
  }
  sort(v.begin, v.end);
  int s = v.size();
  cout << v[s-1] << endl << v[s-2] << endl << v[s-3] << endl;
}

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

int A[11];

int main() {
    for (int i = 0; i < 10; i++) {
        scanf("%d", &A[i]);
    }
    for (int i = 0; i < 3; i++) {
        int max_val = A[i];
        for (int j = i+1; j < 10; j++) {
            if (max_val < A[j]) std::swap(max_val, A[j]);
        }
        A[i] = max_val;
    }
    for (int i = 0; i < 3; i++) {
        printf("%d\n", A[i]);
    }
    return 0;
}

C++: //
//  main.cpp
//  AOJ_V0_0001
//
//  Created by anzai on 2015/08/06.
//  Copyright (c) 2015??´ anzai. All rights reserved.
//

#include<iostream>
using namespace std;

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

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

int cmp(const void *a, const void *b)
{
int*x = (int*)a;
int*y = (int*)b;
if(*x > *y)
return -1;
else if(*x < *y)
return 1;
else
return 0;
}

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

qsort(ara, 10, sizeof(int), &cmp);
for(i = 0; i < 3; i++)
printf("%d\n", ara[i]);
return 0;
}

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

C++: #include<stdio.h>

int main(){
	int a1 = 0, a2 = 0, a3 = 0;

	int x;
	while(scanf("%d", &x)){
		if(x > a3){
			a3 = x;
		}
		if(x > a2){
			a3 = a2;
			a2 = x;
		}
		if(x > a1){
			a3 = a2;
			a2 = a1;
			a1 = x;
		}
	}

	printf("%d\n%d\n%d\n", a1, a2, a3);

	return 0;
}

C++: #include<stdio.h>

int main(void){
	int i,j,k,x[10],highest,higher,high;
	for(i=0;i<10;i++){
		scanf("%d",&x[i]);
	}
	highest=0;
	higher=0;
	high=0;
	for(i=0;i<10;i++){
		if(x[i] >= highest){
		highest=x[i];
	}
	}
	for(j=0;j<10;j++){
		if(x[j]>=higher && highest > x[j]){
		higher=x[j];
	}
	}
	for(k=0;k<10;k++){
		if(x[k]>=high && highest > x[k] && higher > x[k]){
		high=x[k];
		}
	}
	printf("%d\n%d\n%d\n",highest,higher,high);
	
return 0;
}

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

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

int main()
{
    int in;
    int first = 0, second, third;

    for (int i = 0; i < 10; i++) {
        cin >> in;

        if (first <= in) {
            third = second;
            second = first;
            first = in;
        } else if (second <= in) {
            third = second;
            second = in;
        } else if (third <= in) {
            third = in;
        }
    }

    cout << first << endl
         << second << endl
         << third << endl;

    return 0;
}

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

using namespace std;
int main() {
    vector<int> h;
    for(int i=0;i<10;i++){
        int tmp;
        cin >> tmp;
        h.push_back(tmp);
    }

    sort(begin(h),end(h));

    for(int i=0;i<3;i++){
        cout << h[9-i] << endl;
    }
    return 0;

}

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

using namespace std;

int main(void)
{
  int height;
  vector<int> mountain;

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

  sort(mountain.begin(),mountain.end(),greater<int> ());

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

  return 0;

}

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

using namespace std;

int main()
{
  vector<int> height;
  int i = 0, n;
  while (scanf(" %d ", &n) == 1) {height.push_back(-n);}
  sort(height.begin(), height.end());
  for (i = 0; i < 3; i++) {
    printf("%d\n", -1 * height[i]);
  }
  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];

  return 0;
}

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

int main(){

int i,j,h,temp;
int m[10];



//入力
for(i=0; i<10; i++){
   cout << "height of mountain " << i+1 << "(0 <= height of mountain <= 10000):";
   cin >> h;

   if(h >= 0 and h <= 10000){
       m[i]=h;
   }else{
   cout << "0 <= height of mountain <= 10000を満たしておりません。もう一度入力してください。\n";
   i--;
   }
}



//ソート
    for (i = 0; i < 9; i++) {
        for (j = 9; j > i; j--) {
            if (m[j - 1] > m[j]) {  
                temp = m[j];  
                m[j] = m[j - 1];
                m[j - 1] = temp;
            }
        }
    }
    
    
//出力
cout << "result\n";
for (i = 9; i > 6; i--) {
   cout << m[i] << "\n";
}

    return 0;
}

C++: #include<iostream>
using namespace std;
int main() {
	int yama[9];
	int x,y,z,a;
	for(x=0; x<10; x++) {
		cin >> yama[x];
	}
	for(y=0;y<10000; y++) {
		if(yama[y] > yama[y+1]) {
			z = yama[y];
			yama[y] = yama[y+1];
			yama[y+1] = z;
		}
		else {
			a++;
		}
		if(y == 8) {
			if(a == 9) {
				break;
			}
			else {
				y = 0;
				a = 0;
			}
		}
	}
	cout << yama[9] << endl;
	cout << yama[8] << endl;
	cout << yama[7] << endl;
	return 0;
}

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

int main(){
	int array[10];
	int num1=0,num2=0,num3=0;
	for(int i=0;i<10;i++){
		cin >> array[i];
		if(array[i]>num1){
			num3 = num2;
			num2 = num1;
			num1 = array[i];
			continue;
		}
		if(array[i]>num2){
			num3=num2;
			num2=array[i];
			continue;
		}
		if(array[i]>num3){
			num3=array[i];
			continue;
		}
	}

	cout << num1 << endl
		<< num2 << endl
		<< num3 << endl;
	return 0;
}

C++: #include <stdio.h>
#include <stdlib.h>
#include <iostream>
#include <vector>
#include <string>
#include <queue>
#include <algorithm>
#include <math.h>
#include <utility>
#include <set>
#include <map>
#define INF 100000
using namespace std;

int main(){
    vector<int> yama;
    for (int i=0; i<10; i++) {
        int hi;
        cin >>hi;
        yama.push_back(hi);
    }
    sort(yama.begin(), yama.end());
    for (int i=0; i<3; i++) {
        cout << yama[9-i]<<endl;
    }
}