Go: package main

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

var (
	n  = 10
	sc = bufio.NewScanner(os.Stdin)
)

func main() {
	heights := make([]int, n, n)
	for i := 0; i < n; 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 <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;
    }
}

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

int main(){

	int a[11],max1,max2,max3;

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

	max1 = a[0];

	for (i=1; i<10; i++){
		if (max1 < a[i]){
			swap (max1,a[i]);
		}
	}
	max2 = a[1];

	for (i=2; i<10; i++){
		if (max2 < a[i]){
			swap (max2,a[i]);
		}
	}
	max3 = a[2];

	for (i=3; i<10; i++){
		if (max3 < a[i]){
			swap (max3,a[i]);
		}
	}


		cout << max1 << endl;
		cout << max2 << endl;
		cout << max3 << endl;
		

return 0;
	}

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

int main(){
  std::vector<int> a;
  for(int i=0;i<10;i++){
    int tmp;
    std::cin >> tmp;
    a.push_back(tmp);
  }
  std::sort(a.begin(), a.end());
  for(auto i=a.rbegin();i!=a.rbegin()+3;i++){
    std::cout << *i << std::endl;
  }
  return 0;
}

C++: #include <iostream>
#include <algorithm>
using namespace std;
int a[15];

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

int main()
{
    int heights[10];
    for(int i=0;i<10;i++)
    {
        cin>>heights[i];
    }
    sort(0,9);
    cout<<"height of 1st mountain "<<heights[9]<<endl;
    cout<<"height of 2nd mountain "<<heights[8]<<endl;
    cout<<"height of 3rd mountain "<<heights[7]<<endl;
    
    
}