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 <cstdio>

void sort(int a, int b);

int hill[10];
int main() {
    int i;
    for (i = 0; i < 10; i++) {
        scanf("%d", &hill[i]);
    }
    sort(0, 9);
    for (i = 0; i < 3; i++) {
        printf("%d\n", hill[i]);
    }
}

void sort(int a, int b) {
     int left, right, temp, pivot;
     if ( a < b ) {
          left = a; right = b;
          pivot = hill[ (a + b) / 2];
          while (left <= right) {
                while ( hill[left] > pivot ) left++;
                while ( hill[right] < pivot ) right--;
                if ( left <= right) {
                     temp = hill[left];
                     hill[left] = hill[right];
                     hill[right] = temp;
                     left++;
                     right--;
                }
          }
          sort(a, right);
          sort(left, b);
     }
}

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

C++: #include<iostream>
#include<cmath>
#include<string>
#include<cctype>
#include<vector>
using namespace std;
int main(){
        vector<int>ar(10);
        for(auto&e:ar){
                scanf("%d",&e);
        }
        sort(ar.begin(),ar.end());
        printf("%d\n%d\n%d\n",ar[9],ar[8],ar[7]);
        return 0;
}

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

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


int main(void){

	int a[11],i,j;

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


	for (i=1; i<11; ++i){
		for (j=i+1; j<11 ; ++j){
		if (a[i] < a[j]){swap(a[i],a[j]);}
	}
			}


	for (i=1;i<4;++i){
		cout << a[i] << endl;
	}
		

		return 0;
	}

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

int main()
{
	multiset<int> s;
	for(int i=0;i<10;i++){
		int in;
		cin >> in;
		s.insert(in);
	}
	
	multiset<int>::iterator it = s.end();
	--it;
	for(int i=0;i<3;i++){
		cout << *it << endl;
		--it;
	}
	return 0;
}

C++: #include<bits/stdc++.h>
using namespace std;
int main(void){
    int num;
    vector<int> mt(10);
    for(int i=0;i<10;i++){
        cin>>num;
        mt.push_back(num);
    }
    sort(mt.rbegin(),mt.rend());
    printf("%d\n%d\n%d\n",mt[0],mt[1],mt[2]);
    return 0;
}

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

int main(){
    int i=0,j=0,k=0,tmp=0;
    while(cin >> tmp){
        if (tmp > i)
        {
            k = j;
            j = i;
            i = tmp;
        }
        else if (tmp > j)
        {
            k = j;
            j = tmp;
        }
        else if (tmp > k)
        {
            k = tmp;
        }
    }
    cout << i << endl << j << endl << k << endl;
    return 0;
}

C++: #include<stdio.h>
 
int main(void)
{
  int i;
  int low;
  int mid;
  int large;
  int height[10];
   
  i=0;
  while(i++ < 10) {
    scanf("%d", height[i-1]);
    if(i==1) low = mid = large = height[0];
     
    if(height[i-1] > large) {
      large = height[i-1];
      mid = large;
    }
    else
    if(height[i-1] > mid) {
      mid = height[i-1];
      low = mid;
    }
    else
    if (low > height[i-1]){
      low = height[i-1];
    }
  }
  printf("%d\n%d\n%d\n", large,mid,low);
 
  return 0;
}

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

int main()
{
    int x = 10;
    int gunung[x];

    for (x=0 ; x<10 ; x++)
    {
        cin >> gunung[x];
    }

    int pertama = 0;
    int kedua = 0;
    int ketiga = 0;

    for (x=0 ; x<10 ; x++)
    if (gunung[x] > pertama)
    {
        ketiga = kedua;
        kedua = pertama;
        pertama = gunung [x];
    }
    else if (gunung [x] > kedua)
    {
        ketiga = kedua;
        kedua = gunung [x];
    }
    else if (gunung [x] > ketiga)
    {
        ketiga = gunung[x];
    }

    cout << pertama << endl;
    cout << kedua << endl;
    cout << ketiga << endl;

    return 0;
}

C++: #include <stdio.h>
#include <math.h>
 
int main() {
    int m[10];
    int ans[3];
    for(int i=0; i<10; i++) scanf("%d", &m[i]);
 
    ans[0] = 0; ans[1] = 0; ans[2] = 0;
    for(int j=0; j<10; j++) {
        if(m[ans[0]] < m[j]) {
            ans[0] = j;
        }
    }
    if(ans[1] == ans[0]) {
        if(ans[1] == 0) ans[1] = 1;
        else ans[1] = ans[0]-1;
    }
    for(int j=0; j<10; j++) {
        if(m[ans[1]] < m[j] && ans[0] != j) {
            ans[1] = j;
        }
    }
    if(ans[2] == ans[0]) {
        if(ans[2] == 0) ans[2] = 2;
        else ans[2] = ans[0]-2;
    }
    for(int j=0; j<10; j++) {
        if(m[ans[2]] < m[j] && ans[0] != j && ans[1] != j) {
            ans[2] = j;
        }
    }
    printf("%d\n%d\n%d\n", m[ans[0]], m[ans[1]], m[ans[2]]);
    return 0;
}

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

int main()
{
    int n;
    cin>>n;
    int a[n];

    for (int i=0; i<n; i++)
    {
        cin>>a[i];
    }

    for(int i=0; i<n; i++)
        for(int j=i; j<n; j++)
        {
            if(a[i]<a[j])
            {
                int temp = a[i];
                a[i] = a[j];
                a[j] = temp;
            }

        }

    for(int i=0; i<3; i++)
        cout << a[i] << " ";

    return 0;
}

C++: #include <iostream>

using namespace std;

void buble_sort(int high[]){
    int i,j,v,k;

    for(i = 0;i < 9;i++){
        v = i;
        for(j = i;j <= 9;j++){
            if(high[v] < high[j]){
                v = j;
            }
        }
        int box = high[i];
        high[i] = high[v];
        high[v] = box;

    }
}

int main() {
    int i,high[10];

    for (i = 0;i <= 9;i++){
        cin >> high[i];
    }

    buble_sort(high);

    cout << endl;

    for(i = 0;i <= 2;i++){
        cout << high[i];
        if(i != 2){
            cout << endl;
        }
    }

    return 0;
}

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

using namespace std;

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

    return 0;
}