Go: package main

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

func main() {
        fp := os.Stdin
        scanner := bufio.NewScanner(fp)
        var lst [3]int

        for scanner.Scan() {
                num, _ := strconv.Atoi(scanner.Text())
                if lst[0] < num {
                        lst[2] = lst[1]
                        lst[1] = lst[0]
                        lst[0] = num
                } else if lst[1] < num {
                        lst[2] = lst[1]
                        lst[1] = num
                } else if lst[2] < num {
                        lst[2] = num
                }
        }

        for _, i := range lst {
                fmt.Printf("%d\n", i)
        }
}

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

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

using namespace std;

int main()
{
	vector<int> data;
	int temp;

	for (int ix = 0; ix != 10; ++ix){
		cin >> temp;
		data.push_back(temp);
	}

	sort(data.begin(), data.end(), greater<int>());
	for (int ix = 0; ix != 3; ++ix)
		cout << data[ix] << endl;

	return 0;
}

C++: #include<iostream>
#include<algorithm>
using namespace std;
int main(){
	int a[10],f=0,s=0,t=0;
	for(int i=0;i<=9;i++){
		cin>>a[i];
		if(a[i]>t){
			t=a[i];
			if(s<t){
				swap(s,t);
				if(f<s){
					swap(f,s);
				}
			}
		}
	}
	cout<<f<<endl<<s<<endl<<t<<endl;
}

C++: #include <cstdio>
#include <functional>
#include <algorithm>
 
#define SIZE 10
#define MAX 10000
#define TOP 3
 
using namespace std;
 
int main() {
 int i = 0;
 int buf;
 int height[SIZE];
  
 while(i < SIZE) {
  scanf("%d", &buf);
   
  height[i] = buf;
 
  ++i;
 }
 
 sort(height, height + SIZE, greater<int>());
 
 for(i = 0; i < TOP; ++i) {
  printf("%d\n",height[i]);
 }
 
 return 0;
}

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

int main(){
  int a[10];
  int f=0,s=0,t=0;
  cin>>a[0];
  f=a[0];
  for(int i=1;i<10;i++){
    cin>>a[i];
    if(a[i]>=f){
      s=f;
      f=a[i];}
      else if(a[i]>=s){
	t=s;
	s=a[i];}
	else if(a[i]>=t){
	  t=a[i];}
  }
  cout<<f<<endl;
  cout<<s<<endl;
  cout<<t<<endl;
      
    
    
    

  return 0;
}

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

int main(){
	int high[10];
	bool flag;
	for(int i = 0 ; i < 10 ; i++){
		cin >> high[i];
	}

	do{
		flag = false;
		for(int i = 0 ; i < 9 ; i++){
			if(high[i] < high[i+1]){
				int hold = high[i+1];
				high[i+1] = high[i];
				high[i] = hold;
				flag = true;
			}
		}
	}while(flag == true);

	cout << high[0] << endl;
	cout << high[1] << endl;
	cout << high[2] << endl;

    return 0;
}

C++: #include<iostream>
using namespace std;
int main()
{
	int n[15],temp;
	for(int i=0;i<10;i++)cin>>n[i];
	for(int i=0;i<10;i++){
		for(int j=i+1;j<10;j++){
			if(n[i]<n[j]){
				temp=n[i];n[i]=n[j];n[j]=temp;
			}
		}	
	}
	cout<<n[0]<<endl;
	cout<<n[1]<<endl;
	cout<<n[2]<<endl;
	return 0;
}