Go: package main

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

func main() {
	mountHeightList := make([]int64, 10)
	scanner := bufio.NewScanner(os.Stdin)
	for i := 0; i < 10; i++ {
		scanner.Scan()
		mountHeightList[i], _ = strconv.ParseInt(scanner.Text(), 10, 64)
	}

	sort.Slice(mountHeightList, func(i, j int) bool { return mountHeightList[i] > mountHeightList[j] })

	for i := 0; i < 3; i++ {
		fmt.Printf("%d\n", mountHeightList[i])
	}
}

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

namespace
{
	std::vector<unsigned int> altitude(10);
}

int main()
{
	for (unsigned int i = 0; i < 10; i++)
	{
		std::scanf("%u", &altitude[i]);
	}
	std::sort(altitude.begin(), altitude.end(), std::greater<unsigned int>());
	for (unsigned int i = 0; i < 3; i++)
	{
		std::printf("%u\n", altitude[i]);
	}
}

C++: #include "bits/stdc++.h"
using namespace std;

int main() {
	int X[10];
	for (int i = 0; i < 10; i++) {
		cin >> X[i];
	}
	sort(X, X + 10, greater<int>());
	for (int i = 0; i < 3; i++) {
		cout << X[i] << endl;
	}
	return 0;
}

C++: #include <iostream>
#include <iomanip>
#include <vector>
#include <string>
#include <stack>
#include <queue>
#include <deque>
#include <set>
#include <map>
#include <algorithm>
#include <sstream>
#include <cstdlib>
#include <cstring>
#include <functional>
#include <numeric>
#include <cmath>
#include <climits>
#include <limits>
#include <cfloat>
#include <fstream>
using namespace std;

int main()
{
	string str = "";
	int n;
	vector <int> hight;

	while (getline (cin, str )){
		stringstream ssn(str);
		ssn >> n;
		hight.push_back(n);
	} // end while

	sort (hight.begin(), hight.end(), greater<int>() );
	
	int i;
	for (i = 0; i < 3; ++i){
		cout << hight[i] << endl;
	} // end for
		
	return 0;
}

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

int main() {
	int m[10];
	for(int i=0; i<9; i++) cin >> m[i];
	sort(m, m+10);
	for(int i=9; i>6; i++) cout << m[i] << endl;

	return 0;
}

C++: #include <stdio.h>

int main(void)
{
	int       i = 0;
	int buf[10] = { 0 };
	int top3[3] = { 0 };
	printf("??????10?????\????????????????????????\n");
	while(i < 10) {
		scanf("%d",&buf[i]);
		if(10000 < buf[i] ||
		   0     > buf[i]) {
			//printf("??\??????????????????");
			continue;
		}
		i++;
	}
	
	for(i = 0; i < 10; i++) {
		if(buf[i] > top3[2]) {
			if(buf[i] > top3[1]){
				if(buf[i] > top3[0]){
						top3[2] = top3[1];
						top3[1] = top3[0];
						top3[0] = buf[i];
				}
				else{
					top3[2] = top3[1];
					top3[1] = buf[i];
				}
			}
			else {
				top3[2] = buf[i];
			}
		}
	}
	printf("%d\n%d\n%d\n", top3[0],top3[1],top3[2]);
	return 0;
}

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

int main()
{
	int a[10];
	int data_size = sizeof(a) / sizeof(a[0]) - 1;
	for (int i=0;i<=data_size;i++)
		cin >> a[i];
	sort(a,a+sizeof(a) / sizeof(a[0]));
	for (int j=data_size;j<=data_size-2;j--)
		cout << a[j] << ",";
}

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

int main(){
    int i;
    int mount[10];
    int *p=&mount[0];
    for(i=0;i<10;i++){
        scanf("%d\n",p);
        p++;
    }
    sort(mount,mount+10,[](int x,int y){return x>y;});
    printf("%d\n%d\n%d",mount[0],mount[1],mount[2]);
    return 0;
}

C++: #include <iostream>
using namespace std;
 
int main()
{
    const int N = 10;
    int A[N];
    const int M = 3;
    int top[M] = {0};
 
    for (int i = 0; i < N; i++)
        cin >> A[i];
 
    for (int i = 0; i < N; i++)
    {
        if(top[0] < A[i])
        {
            top[2] = top[1];
            top[1] = top[0];
            top[0] = A[i];
        }
        else if(top[1]<A[i])
        {
            top[2] = top[1];
            top[1] = A[i];
        }
        else if(top[2] < A[i])
            top[2] = A[i];
    }
 

    for(int i = 0; i < M; i++)
        cout << ' ' << top[i];
    cout << endl;
 
    return 0;
}

C++: #include <iostream>

int main(){
	int m,mf=0,ms=0,mt=0;
	for(int a=0;a<10;a++){
		std::cin>>m;
		if(m>mf){
			mt=ms;
			ms=mf;
			mf=m;
			m=0;
	    }
		if(m>ms){
			mt=ms;
			ms=m;	
			m=0;
		}
			
		if(m>mt){
			mt=m;
			
		}
			
		
	}
	std::cout<<mf<<std::endl<<ms<<std::endl<<mt<<std::endl;
	return 0;
}

C++: #include <iostream>
 
int main() {
  int x;
  int rank1 = 0;
  int rank2 = 0;
  int rank3 = 0;
  for (int i = 0; i < 10; i++) {
    std::cin >> x;
    if (x > rank1) {
      rank3 = rank2;
      rank2 = rank1;
      rank1 = x;
    } else if (x > rank2) {
      rank3 = rank2;
      rank2 = x;
    } else if (x > rank3) {
      rank3 = x;
    }
  }
  std::cout << rank1 <<  rank2 << rank3 << std::endl;
  return 0;
}

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

C++: /* List of Top 3 Hills */
#include <iostream>
using namespace std;

int main(void) {
  int height[3] = {0,0,0};
  int n;
  while(cin >> n) {
    if (n > height[0]) {
      height[2] = height[1];
      height[1] = height[0];
      height[0] = n;
    }
    else if (n > height[1]) {
      height[2] = height[1];
      height[1] = n;
    }
    else if (n > height[2]) {
      height[2] = n;
    }
  }

  for (int i = 0; i < 3; i++) {
    cout << height[i] << endl;
  }

  return 0;
}

C++: #include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
int main(){
	vector<int> a(10);
	for(int i=0;i<10;i++)cin>>a[i];
	sort(a.begin(),a.end(), std::greater<int>());
	for(int i=0;i<3;i++)cout<<a[i]<<endl;
}

C++: #include <iostream>
#include <string>
#include <cctype>
using namespace std;
int main(){
    string line;
    for(;getline(cin,line);){
        for(int i=0;i<line.size();i++)line[i]=toupper(line[i]);
        cout<<line<<endl;
    }
}

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

int main(){
	int yama[10], i, p, Flag = 0, t;
	for(i = 0; i < 10; i++)
		cin >> yama[i];
	while(1){
		Flag = 0;
		for(i = 0; i < 10; i++){
			if(yama[i] < yama[i + 1]){
				t = yama[i];
				yama[i] = yama[i + 1];
				yama[i + 1] = t;
				Flag++;
			}
		}
		if(Flag != 0)
			break;
	}
	cout << yama[1] << "\n";
	cout << yama[2] << "\n";
	cout << yama[3] << "\n";
	return 0;
}

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

int main(){
	std::vector<int> vec(10);
	for(int i=0;i<10;i++){
		std::cin>>vec[i];
	}
	while(1){
		int a=0;
		for(int i=0;i<9;i++){
			if(vec[i]>vec[i+1]){
				int b=0;
				b=vec[i];
				vec[i]=vec[i+1];
				vec[i+1]=b;
				a++;
			}
		}
		if(a==0)break;
	}
	std::cout<<vec[9]<<std::endl<<vec[8]<<std::endl<<vec[7]<<std::endl;
	return 0;
}

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

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

C++: #include<stdio.h>
   
int main(void){
   
    /* 宣言と初期化 */
    int hai[10];
    int i;
    int temp2nd;
    int temp3rd;
    int tempmax;
   
for(i=0;i<10;i++)
{
printf("山の高さ　");
scanf("%d",&hai[i]);
}
    /* 代入 */
    temp2nd=hai[0];
    tempmax=hai[0];
    temp3rd=hai[0];
   
    /* 計算 */
    for(i=0;i<10;i++){
        /* 最大値求める */
        if(hai[i]>tempmax)
        tempmax=hai[i];
    }
   
    for(i=0;i<10;i++){
        /*2番目求める */
        if(hai[i]<tempmax&&hai[i]>temp2nd)
        temp2nd=hai[i];
    }
   
    for(i=0;i<10;i++){
        /* 3番目求める */
        if(hai[i]>temp3rd&&hai[i]<temp2nd)
        temp3rd=hai[i];
    }
   
    /* 表示 */
    printf("最も高い山の高さ　%d\n",tempmax);
    printf("２番目に高い山の高さ　%d\n",temp2nd);
    printf("３番目に高い山の高さ　%d\n",temp3rd);
   
    return 0;
}