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>
#include <algorithm>
using namespace std;
int main(){
    int input[10];
    
    for(int i = 0; i < 10; i++){
        cin >> input[i];
    }
    
    sort(input, input+10, greater<int>());
    
    for(int n = 0; n < 3; n++){
        cout << input[n] << endl;
    }
    return 0;
}

C++: #include <iostream>

using namespace std;

int main()
{
    int temp;
    int height[10];
    int n = sizeof(height)/sizeof(height[0]);
    for(int x = 0; x < n; x++){
        cin >> height[x];//input
    }
    for(int q = 0; q < n - 1; q++){
        for(int w = 0; w < n - q - 1; w++)
        {
            if(height[w] < height [w+1])
            {
                temp  = height[w];
                height[w] = height[w+1];
                height[w+1] = temp;
            }
        }
    }
    for(int x = 0; x < 3; x++){
        cout << height[x] << endl;
    }
    return 0;
}

C++: #include<stdio.h>#include<algorithm>int main(){int a[10];for(int i = 0; i < 10; i++)scanf("%d", &a[i]);std::sort(a);for(int i = 0; i < 3; i++)printf("%d\n", a[i]);return 0;}

C++:  #include <cstdio>
 #include <queue>
 using namespace std;
 
 int main()
 {
         priority_queue<int> pmount;

         int mount[11];

         for(int j=0;j<10;j++){
                 scanf("%d",&mount[j]);
                 pmount.push(mount[j]);
         }

         for(int i=0;i<3;i++){
                 printf("%d\n",pmount.top());
                 pmount.pop();
         }

         return 0;

 }

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

int main()
{
	int length;
	int a, b, c,tmp;
	a = b = c = 0;

	for (int i = 0; i < 10; i++)
	{
		scanf("%d",&length);
		if (length > a)
		{
			if (length > b)
			{
				a = b;
				if (length > c)
				{
					b = c;
					c = length;
				}
				else
				{
					b = length;
				}
			}
			else
			{
				a = length;
			}
		}
		printf("%d\n",c);
		printf("%d\n",b);
		printf("%d\n",a);
	}
	return 0;
}

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

int main(){
	int x[10];
	for (int i = 0; i < 10; i++){
		cin >> x[i];
	}
	sort(end(x), begin(x));
	cout << x[0];
	cout << x[1];
	cout << x[2];
	
}

C++: #include <stdio.h>

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

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

int main(void){
    int i, j, minj, cnt, high[10];
    for(i=0; i<10; i++) cin >> high[i];
    for (i=0; i<10; i++){
        minj = i;
        for(j=i+1; j<10; j++){
            if(high[j] < high[minj]){
                minj = j; 
            }
        }
        if(minj!=i){
            cnt++;
            swap(high[i], high[minj]);
        }
    }
    cout << high[9] << endl;
    cout << high[8] << endl;
    cout << high[7] << endl;
    return 0;
}

C++: //List of Top 3 Hills
#include<bits/stdc++.h>
using namespace std;
vector<int> v;

int main(){
  for(int i=0; i<10; i++){
    int tmp;
    scanf("%d", &tmp);
    v.push_back(tmp);
  }
  sort(v.begin(), v.end(), greater<int>());
  for(int i=0; i<3; i++)
    printf("%d\n", v[i]);
  return 0;
}

C++: #include <iostream>
#include <stdio.h>
#include <cstring>
#include <math.h>
#include <algorithm>
#include <vector>
#include <string>
#include <stdlib.h>
#include <queue>
#include <utility>
#define rep(i,n) for(int i=0;i<n;i++)
#define rrep(i,n) for(int i=n-1;i>=0;i--)
#define FOR(i,a,b) for(int i=a;i<b;i++)
#define ll long long
#define LL long long
#define INF 100000000
using namespace std;
int keta(int n,int k){return (n/int(pow(10,double(k-1)))) % 10;} //n????????????k??????
ll gcd(ll n,ll m){
	if(n<m){ll a=m;m=n;n=a;}
	ll r=n%m;
	while(r!=0){
		n=m;
		m=r;
		r=n%m;
	}
	return m;
}
ll lcm(ll n,ll m){
	return n*m/gcd(n,m);
}
int main(){
	
	int x[10];
	rep(i,10){
		cin>>x[i];
	}
	sort(x,x+10);
	cout<<x[9]<<endl<<x[8]<<endl<<x[7]<<endl;
}

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

void swap(int *b, int *c)
{
    int tmp;
    tmp = *b;
    *c = *b;
    *b = tmp;
}

int main(void){

	int a[11],max1,max2,max3;

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

	max1 = a[1];

	for (int i=2; i<11; i++){
		if (max1 < a[i]){
			swap(max1,a[i]);
		}
	}
	max2 = a[2];

	for (int i=3; i<11; i++){
		if (max2 < a[i]){
			swap(max2,a[i]);
		}
	}
	max3 = a[3];

	for (int i=4; i<11; i++){
		if (max3 < a[i]){
			swap(max3,a[i]);
		}
	}


		cout << max1 << endl;
		cout << max2 << endl;
		cout << max3 << endl;
		

return 0;
	}

C++: #include<iostream> 
#include<algorithm>
using namespace std;
void bubblesort(int A[]){
	for(int i=0;i<10;i++){
		for(int j=10-1;j>i;j--){
			if(A[j]>A[j-1]){
			int t=	A[j-1];
			A[j-1]=A[j];
			A[j]=t;
			}
		}
	}	
}
int main(){
	int A[10];
	int a; 
	for(int i=0;i<10;i++){
		
		cin>>a;
		if(a>=0&&a<=10000)A[i]=a;
		
	}
	for(int i=0;i<3;i++)
	{
		bubblesort(A);
		if(i>0)cout<<endl;
		cout<<A[i];
	  } 
	 return 0;
}

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

int main() {
&#8195;&#8195;&#8195;int height[10];
&#8195;&#8195;&#8195;int tmp;
&#8195;&#8195;&#8195;int i=0,j=0;

&#8195;&#8195;&#8195;for (;i<10;i++)
&#8195;&#8195;&#8195;&#8195;&#8195;&#8195;cin>>height[i];
&#8195;&#8195;&#8195;for (i=0;i<100;i++)
&#8195;&#8195;&#8195;&#8195;&#8195;&#8195;for(j=1;j<10;j++)
&#8195;&#8195;&#8195;&#8195;&#8195;&#8195;&#8195;&#8195;&#8195;if (height[j-1]<height[j]) {
&#8195;&#8195;&#8195;&#8195;&#8195;&#8195;&#8195;&#8195;&#8195;&#8195;&#8195;&#8195;tmp = height[j-1];
&#8195;&#8195;&#8195;&#8195;&#8195;&#8195;&#8195;&#8195;&#8195;&#8195;&#8195;&#8195;height[j-1] = height[j];
&#8195;&#8195;&#8195;&#8195;&#8195;&#8195;&#8195;&#8195;&#8195;&#8195;&#8195;&#8195;height[j] = tmp;
&#8195;&#8195;&#8195;&#8195;&#8195;&#8195;&#8195;&#8195;&#8195;}

&#8195;&#8195;&#8195;for (i=0;i<3;i++)
&#8195;&#8195;&#8195;&#8195;&#8195;&#8195;cout<<height[i]<<endl;
&#8195;&#8195;&#8195;return 0;
}

C++: #include <stdio.h>
int main()
{
    int a, max_1 = 0, max_2 = 0, max_3 = 0;
    using namespace std;
    for (int I = 0; I < 10; I++)
    {
        scanf("%d", &a);
        if (a>  max_1)
        {
            max_3 = max_2; max_2 = max_1; max_1 = a;
        }
        else if(a > max_2)
        {
            max_3 = max_2; max_2 = a;
        }
        else if (a > max_3)
        {
            max_3 = a;
        }
    }
    printf("%d\n%d\n%d\n", max_1, max_2, max_3);
    return 0;
}