Go: package main

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

func main() {
	scanner := bufio.NewScanner(os.Stdin)
	counter := 0
	var mountain []int
	for scanner.Scan() {
		i, err := strconv.Atoi(scanner.Text())
		if err != nil {
			break
		}
		mountain = append(mountain, i)
		counter++
		if counter == 10 {
			break
		}

	}
	sort.Ints(mountain)
	fmt.Println(mountain[9])
	fmt.Println(mountain[8])
	fmt.Println(mountain[7])
}

C++: #include<iostream>
using namespace std;
int main(){
  int a;
  int x=0;
  int y=0;
  int z=0;
  for(int i=1;i<=10;i++){
    cin >> a;
    if(a>x){
      x=a;
    }else if(y<a<=x){
      y=a;
    }else if(z<a<=y){
      z=a;
    }
  }
  cout << x << endl;
  cout << y << endl;
  cout << z << endl;
}

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

using namespace std;
int x[10];
int main(){
for(int i=0;i<10;i++){
cin>>x[i];
}
sort(x,x+10);
cout<<x[9]<<endl;
cout<<x[8]<<endl;
cout<<x[7]<<endl;
return 0;
}

C++: #include<iostream>
#include<vector>
int main(){
	std::vector<int> n(10);
	for(int i=0;i<=9;i++){
		std::cin>>n[i];
	}
	for(int i=0;i<9;i++){
		for(int j=i+1;j<=9;j++){
			if(n[i]<n[j]){
				int a=n[i];
				n[i]=n[j];
				n[j]=a;
			}
		}
	}
	for(int i=0;i<3;i++){
		std::cout<<n[i]<<std::endl;
	}
	return 0;
}

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

int main() {

	int yama[10];
	
	for(int i = 0; i <= 9; i++) {
	cin >> yama[i];
	}
	
	for(int i = 0; i <= 8; i++) {
		for(int j = i + 1; j <= 9; j++) {
			if(yama[i] < yama[j]){
				int x = yama[i];
				yama[i] = yama[j];
				yama[j] = x;
			}
		}
			
	}
	cout << yama[0] << endl << yama[1] << endl << yama[2] << endl;
	
    return 0;
}

C++: #include <iostream> using namespace std; int main() { int i=0; int num[10]; for(;i<10;i++) cin>>num[i]; int temp=0,temp1=0,j=0,k=0; for(;j<3;j++) { for(i=0;i<10;i++) { temp1=temp; temp=temp<num[i]?num[i]:temp; if(temp>temp1) k=i; } cout<<num[k]<<endl; temp=0; num[k]=0; } return 0; }

C++: #include <iostream>
#include <vector>
using namespace std;
int main(){
    vector<int> height;
    int h;
    while (cin>>h) {
        height.push_back(h);
    }
    sort(height.begin(), height.end());
    for(int i=1;i<=3;i++){
        cout<<height[height.size()-i]<<endl;
    }
    return 0;
}

C++: #include<iostream>
 using namespace std;
int main()
{
  int a,b,c,d,e,f,g,h,i,j,x,y,z;
  while(cin>>a,b,c,d,e,f,g,h,i,j)
  {
	  if(a>0)x=a;
	  if(b>a)x=b;
	  if(c>a)x=c;
	  if(d>a)x=d;
	  if(e>a)x=e;
	  if(f>a)x=f;
	  if(g>a)x=g;
	  if(h>a)x=h;
	  if(i>a)x=i;
	  if(j>a)x=j;
	   if(a>0&&a<x)y=a;
	  if(b>a&&b<x)y=b;
	  if(c>a&&c<x)y=c;
	  if(d>a&&d<x)y=d;
	  if(e>a&&e<x)y=e;
	  if(f>a&&f<x)y=f;
	  if(g>a&&g<x)y=g;
	  if(h>a&&h<x)y=h;
	  if(i>a&&i<x)y=i;
	  if(j>a&&j<x)y=j;
	   if(a>0&&a<x,y)z=a;
	  if(b>a&&b<x,y)z=b;
	  if(c>a&&c<x,y)z=c;
	  if(d>a&&d<x,y)z=d;
	  if(e>a&&e<x,y)z=e;
	  if(f>a&&f<x,y)z=f;
	  if(g>a&&g<x,y)z=g;
	  if(h>a&&h<x,y)z=h;
	  if(i>a&&i<x,y)z=i;
	  if(j>a&&j<x,y)z=j;
	  cout<<x<<endl;
	  cout<<y<<endl;
	  cout<<z<<endl;
  }
	return 0;
}

C++: #include <stdio.h>


int main(){
	int h[3]={0,0,0};
	int c,i;
	for(i=0;i<10;i++){
		scanf("%d",&c);
		if(c>h[0]){
			h[2]=h[1];
			h[1]=h[0];
			h[0]=c;
		}else if(c>h[1]){
			h[2]=h[1];
			h[1]=c;
		}else if(c>h[0]){
			h[2]=c;
		}
	}
	for(i=0;i<3;i++){
		printf("%d\n",h[i]);
	}
}

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

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

int main(){
    int x;
    int h[3];
    for(int a=0;a<10;a++){
        cin >> x;
        if(x>h[0]){
            h[2] = h[1];
            h[1] = h[0];
            h[0] = x;
        }else if(x>h[1]){
            h[2] = h[1];
            h[1] = x;
        }else if(x>h[2]){
            h[2] = x;
        }
    }
    cout << h[0] << "\n" << h[1] << "\n" << h[2] << "\n";
    return 0;
}

C++: #include <iostream>
#include<stdlib.h>

using namespace std;

int main() {
	const int len = 10;
	int arr[len];

	for (int i = 0; i < len; i++)
		cin >> arr[i];

	for (int i = 0; i < len; i++)
		for (int j = 0; j < len; j++)
			if (arr[i] < arr[j])
				swap(arr[i], arr[j]);

	cout << endl;

	for (int i = len - 1; len - 4 < i; i--)
		cout << arr[i] << endl;

	return 0;
}

C++: #include <bits/stdc++.h>
using namespace std;
#define REP(i, s, n) for (int i = s; i < n; ++i)
#define rep(i, n) REP(i, 0, n)
#define SORT(c) sort((c).begin(), (c).end())
#define IINF INT_MAX
#define LLINF LLONG_MAX
#define DEBUG true
// sort(a.begin(), a.end(), std::greater<int>());

/*
std::vector<std::string> split(const std::string &input, char delimiter)
{
    std::istringstream stream(input);

    std::string field;
    std::vector<std::string> result;
    while (std::getline(stream, field, delimiter))
    {
        result.push_back(field);
    }
    return result;
}
*/

int main()
{
    vector<int> a(10);
    rep(i, 10)
    {
        cin >> a[i];
    }
    SORT(a);
    rep(i,3){
        cout<<a[i]<<endl;
    }
    return 0;
}

C++: #include<cstdio>
#include<iostream>
using namespace std;
int a[11];
int main()
{
	int i,max1=-1,max2=-1,max3=-1;
	for(i=1;i<=10;i++)
	{
		cin>>a[i];
		if(a[i]>max1){max3=max2;max2=max1;max1=a[i];}
		else if(a[i]>max2){max3=max2;max2=a[i];}
		else if(a[i]>max3)max3=a[i];
	}
	cout<<max1<<endl<<max2<<endl<<max3<<endl;
	return 0;
}

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

void swap(int& x, int& y){
    int t = x;
    x = y;
    y = t;
}
int main(){
    int height[10];
    //入力
    for(int i = 0;i < 10;i++){
        cin >> height[i];
        if(height[i] < 0 || height[i] > 10000){
            i--;
        }
    }
    //ソート
    for(int i = 0;i < 10;i++){
        for(int j = i;j > 0;j--){
            if(height[j] > height[j-1]){
                swap(height[j], height[j-1]);
            }
        }
    }
    //出力
    for(int i = 0;i < 3;i++){
        cout << height[i] << "\n";
    }
    return 0;
}

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

int main(int argc, char const *argv[]) {
  int input_num = 10;

  list<int> ls;

  int height = 0;
  for (size_t i = 0; i < input_num; i++) {
    cin >> height;
    ls.push_back(height);
  }

  ls.sort(std::greater<int>());

  list<int>::iterator it = ls.begin();
  for (int i = 0; i < 3; i++) {
    cout << *it << endl;
    it++;
  }

  return 0;
}

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

void listen_hills(std::vector<int> &hills);
void echo_top3(const std::vector<int> &hills);

int main()
{
	using namespace std;
	
	vector<int> hills;
	listen_hills(hills);
	sort(hills.begin(),hills.end(),greater<int>());
	echo_top3(hills);
	
	return 0;
}

void listen_hills(std::vector<int> &hills)
{
	using namespace std;
	int tmp;
	for(int hillCount=0;hillCount<10;hillCount++)
	{
		cin>>tmp;
		hills.push_back(tmp);
	}
}

void echo_top3(const std::vector<int> &hills)
{
	using namespace std;
	vector<int>::const_iterator itr=hills.begin();
	for(int count=0;count<3;count++)
	{
		cout<<*itr++<<endl;
	}
}