Go: package main

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

var sc = bufio.NewScanner(os.Stdin)

func main() {
	heights := make([]int, 10)
	for i := 0; i < 10; i++ {
		sc.Scan()
		heights[i], _ = strconv.Atoi(sc.Text())
	}

	sort.Sort(sort.Reverse(sort.IntSlice(heights)))
	for i := 0; i < 3; i++ {
		fmt.Println(heights[i])
	}
}

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

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

  for(int i = 0; i < 10; ++i) {
    for(int j = 9; j > i; --j) {
      if(a[j] < a [j - 1]) {
        int t = a[j];
        a[j] = a[j - 1];
        a[j - 1] = t;
      }
    }
  }

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

C++: #include<iostream>
using namespace std;
int main(){
int a=0,b=0,c=0,i,val,tmp_a,tmp_b;
for(i=0;i<10;i++){
cin >> val;
if(val>a){
tmp_a=a;
a=val;
tmp_b = b;
b=tmp_a;
c=tmp_b;
}else if(val>b){
tmp_a = b;
b = val;
c = tmp_a;
}else if(val>c){
c=val;
}
}
cout << a << "\n" << b << "\n" << c << endl;
return 0;
}

C++: #include <cstdio>

void sort(int a, int b);

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

void sort(int a, int b) {
     int left, right, temp, pivot;
     if ( a < b ) {
          left = a; right = b;
          pivot = hill[ (a + b) / 2];
          while (left <= right) {
                while ( hill[left] > pivot ) left++;
                while ( hill[right] < pivot ) right--;
                if ( left <= right) {
                     temp = hill[left];
                     hill[left] = hill[right];
                     hill[right] = temp;
                     left++;
                     right--;
                }
          }
          sort(a, right);
          sort(left, b);
     }
}

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++){
    cin>>inHigh[i];
  }
  
  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;
  }
  cout << endl;
  for(int i = 0; i < 3; i++){
    cout << outHigh[i]<<endl;
  }
  
}

C++: #include<iostream>
#include<cmath>
#include<string>
#include<cctype>
#include<vector>
using namespace std;
int main(){
        vector<int>ar(10);
        for(auto&e:ar){
                scanf("%d",&e);
        }
        sort(ar.begin(),ar.end());
        printf("%d\n%d\n%d\n",ar[9],ar[8],ar[7]);
        return 0;
}

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

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


int main(void){

	int a[11],i,j;

	for (int i=1; i<11; i++){
		while (true){ 
		cout << "山の高さ" << i << "（整数）" ;			
		cin >> a[i];
		if ((cin.good() == 1) && (a[i] >= 0) && (a[i] <= 10000)) {
			break;
		}
		}	
	}


	for (i=1; i<11; ++i){
		for (j=i+1; j<11 ; ++j){
		if (a[i] < a[j]){swap(a[i],a[j]);}
	}
			}


	for (i=1;i<4;++i){
		cout << a[i] << endl;
	}
		

		return 0;
	}

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

int main()
{
	multiset<int> s;
	for(int i=0;i<10;i++){
		int in;
		cin >> in;
		s.insert(in);
	}
	
	multiset<int>::iterator it = s.end();
	--it;
	for(int i=0;i<3;i++){
		cout << *it << endl;
		--it;
	}
	return 0;
}

C++: #include<bits/stdc++.h>
using namespace std;
int main(void){
    int num;
    vector<int> mt(10);
    for(int i=0;i<10;i++){
        cin>>num;
        mt.push_back(num);
    }
    sort(mt.rbegin(),mt.rend());
    printf("%d\n%d\n%d\n",mt[0],mt[1],mt[2]);
    return 0;
}

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

int main(){
    int i=0,j=0,k=0,tmp=0;
    while(cin >> tmp){
        if (tmp > i)
        {
            k = j;
            j = i;
            i = tmp;
        }
        else if (tmp > j)
        {
            k = j;
            j = tmp;
        }
        else if (tmp > k)
        {
            k = tmp;
        }
    }
    cout << i << endl << j << endl << k << endl;
    return 0;
}

C++: #include<stdio.h>
 
int main(void)
{
  int i;
  int low;
  int mid;
  int large;
  int height[10];
   
  i=0;
  while(i++ < 10) {
    scanf("%d", height[i-1]);
    if(i==1) low = mid = large = height[0];
     
    if(height[i-1] > large) {
      large = height[i-1];
      mid = large;
    }
    else
    if(height[i-1] > mid) {
      mid = height[i-1];
      low = mid;
    }
    else
    if (low > height[i-1]){
      low = height[i-1];
    }
  }
  printf("%d\n%d\n%d\n", large,mid,low);
 
  return 0;
}

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

int main()
{
    int x = 10;
    int gunung[x];

    for (x=0 ; x<10 ; x++)
    {
        cin >> gunung[x];
    }

    int pertama = 0;
    int kedua = 0;
    int ketiga = 0;

    for (x=0 ; x<10 ; x++)
    if (gunung[x] > pertama)
    {
        ketiga = kedua;
        kedua = pertama;
        pertama = gunung [x];
    }
    else if (gunung [x] > kedua)
    {
        ketiga = kedua;
        kedua = gunung [x];
    }
    else if (gunung [x] > ketiga)
    {
        ketiga = gunung[x];
    }

    cout << pertama << endl;
    cout << kedua << endl;
    cout << ketiga << endl;

    return 0;
}

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

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

int main()
{
    int n;
    cin>>n;
    int a[n];

    for (int i=0; i<n; i++)
    {
        cin>>a[i];
    }

    for(int i=0; i<n; i++)
        for(int j=i; j<n; j++)
        {
            if(a[i]<a[j])
            {
                int temp = a[i];
                a[i] = a[j];
                a[j] = temp;
            }

        }

    for(int i=0; i<3; i++)
        cout << a[i] << " ";

    return 0;
}

C++: #include <iostream>

using namespace std;

void buble_sort(int high[]){
    int i,j,v,k;

    for(i = 0;i < 9;i++){
        v = i;
        for(j = i;j <= 9;j++){
            if(high[v] < high[j]){
                v = j;
            }
        }
        int box = high[i];
        high[i] = high[v];
        high[v] = box;

    }
}

int main() {
    int i,high[10];

    for (i = 0;i <= 9;i++){
        cin >> high[i];
    }

    buble_sort(high);

    cout << endl;

    for(i = 0;i <= 2;i++){
        cout << high[i];
        if(i != 2){
            cout << endl;
        }
    }

    return 0;
}

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);
    for (int i = 0; i < 3; i++) {
        cout << a[i] << endl;
    }

    return 0;
}