Go: package main

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

var sc = bufio.NewScanner(os.Stdin)

func read() string {
	sc.Scan()
	return sc.Text()
}

func main() {
	sc.Split(bufio.ScanLines)

	s := make([]int, 10)
	for i := 0; i < 10; i++ {
		s[i], _ = strconv.Atoi(read())
	}
	sort.Sort(sort.Reverse(sort.IntSlice(s)))
	fmt.Println(s[0])
	fmt.Println(s[1])
	fmt.Println(s[2])
}

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;
}

C++: #include <iostream>
using namespace std;
int main(void){
    int x = 0; 
    int rank01 = 1;
    int rank02 = 2;
    int rank03 = 3;
    
    for(int i = 0; i < 10; i++){
        cin >> x;
        if(rank01 < x){
            rank03 = rank02;
            rank02 = rank01;
            rank01 = x;
        }
        else if(rank02 < x){
            rank03 = rank02;
            rank02 = x;
        }
        else if (rank03 < x){
            rank03 = x;
        }
    }
    
    std::cout << rank01 << std::endl<< rank02 << std::endl << rank03 << std::endl; 
    
    return 0;
}

C++: #include<stdio.h>

int main(void)
{
	int high[10];
	int i, j, temp;
	
	for(i = 0; i < 10; i++){
		scanf("%d",&high[i]);
	}
	
	for (i = 0; i < 9; i++){
		for (j = 9; j > i; j--){
			if (high[j - 1] < high[j]){
				temp = high[j];
				high[j] = high[j - 1];
				high[j - 1]= temp;
			}
		}
	}
	printf("\n%d\n%d\n%d",high[0], high[1], high[2]);
	
	return 0;
}

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

int main()
{
	int h1 = 0, h2 = 0, h3 = 0;
	int hdata[10];
	for (int n = 0; n < 10; n++) {
		cin >> hdata[n];
		if (hdata[n] > h1)
			h1 = hdata[n];
	}
	for (int n = 0; n < 10; n++) {
		if (hdata[n] > h2 && h1 != hdata[n])
			h2 = hdata[n];
	}
	for (int n = 0; n < 10; n++) {
		if (hdata[n] > h3 && h1 != hdata[n] && h2 != hdata[n])
			h3 = hdata[n];
	}

	cout << h1 << endl << h2 << endl << h3 << endl;
}