Go: package main

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

var sc = bufio.NewScanner(os.Stdin)

func main() {
	heights := make([]int, 10)
	for i := 0; i < 10; i++ {
		sc.Scan()
		heights[i], _ = strconv.Atoi(sc.Text())
	}

	sort.Sort(sort.Reverse(sort.IntSlice(heights)))
	for i := 0; i < 3; i++ {
		fmt.Println(heights[i])
	}
}

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

C++: #include<stdio.h>
int main(void) {
	int i, mountain[10],x,y;
	int n = 0;
	int l = 0;
	int m = 0;
	for (i = 0;i < 10;i++) {
		scanf("%d", &mountain[i]);
	}
	for (i = 0;i < 10;i++) {
		if (mountain[i] > m) m = mountain[i];
		x = i;
	}
	printf("%d\n", m);
	for (i = 0;i < 10;i++) {
		if (i == x) {}
		else {
			if (mountain[i] > n) {
				n = mountain[i]; 
			}
			y = i;
		}
	}
	printf("%d\n", n);
	for (i = 0;i < 10; i++) {
		if (i == y || i == x) {}
		else {
			if (mountain[i] > l) {
				l = mountain[i];
			}
		}
	}
	printf("%d\n", l);

	return 0;
}

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

int main(){
int a[10];

for(int i=0;i<10;i++){
scanf(" %d",&a[i]);
}

sort(a,a+10);

for(int i=9;i>=7;i--){
cout << a[i] <<endl;
}

return 0;
}

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

using namespace std;

int main() {
	int m[10];

	for (int i = 0; i < 10; i++)cin >> m[i];

	stable_sort(m, m + 10);

	for (int i = 9; i > 6; i--)cout << m[i] << endl;

	return 0;
}

C++: #include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <climits>
#include <cfloat>
#include <ctime>
#include <cassert>
#include <map>
#include <utility>
#include <set>
#include <iostream>
#include <memory>
#include <string>
#include <vector>
#include <algorithm>
#include <functional>
#include <sstream>
#include <complex>
#include <stack>
#include <queue>
#include <numeric>
#include <list>
#include <iomanip>


using namespace std;

#ifdef _MSC_VER
#define __typeof__ decltype
template <class T> int popcount(T n) { return n ? 1 + popcount(n & (n - 1)) : 0; }
#endif
#ifdef __GNUC__
template <class T> int popcount(T n);
template <> int popcount(unsigned int n) { return n ? __builtin_popcount(n) : 0; }
template <> int popcount(int n) { return n ? __builtin_popcount(n) : 0; }
template <> int popcount(unsigned long long n) { return n ? __builtin_popcountll(n) : 0; }
template <> int popcount(long long n) { return n ? __builtin_popcountll(n) : 0; }
#endif

#define foreach(it, c) for (__typeof__((c).begin()) it=(c).begin(); it != (c).end(); ++it)
#define all(c) (c).begin(), (c).end()
#define rall(c) (c).rbegin(), (c).rend()
#define CL(arr, val) memset(arr, val, sizeof(arr))

#define rep(i, n) for (int i = 0; i < n; ++i)

template <class T> void max_swap(T& a, const T& b) { a = max(a, b); }
template <class T> void min_swap(T& a, const T& b) { a = min(a, b); }

typedef long long ll;
typedef pair<int, int> pint;

const double EPS = 1e-8;
const double PI = acos(-1.0);
const int dx[] = { 0, 1, 0, -1 };
const int dy[] = { 1, 0, -1, 0 };
bool valid_pos(int x, int y, int w, int h) { return 0 <= x && x < w && 0 <= y && y < h; }

template <class T> void print(T a, int n, int br = 1, const string& deli = ", ") { cout << "{ "; for (int i = 0; i < n; ++i) { cout << a[i]; if (i + 1 != n) cout << deli; } cout << " }"; while (br--) cout << endl; }
template <class T> void print(const vector<T>& v, int br = 1, const string& deli = ", ") { print(v, v.size(), br, deli); }


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

C++: #include <iostream>
using namespace std;
 
int main()
{
     int a, b;
     cin >> a >> b;
     cout << a*b << " " << 2*(a+b) << endl;
}

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

void swap(int* x, int* y) {
	int tmp;
	tmp = *x;
	*x = *y;
	*y = tmp;
}

void isort(int b[]) {
	int c[10],max = 0, k = 0;
	for (int i = 0; i < 10; i++) {
		max = b[i];
		for (int j = i; j < 10; j++) {
			if (max < b[j]) {
				swap(&max, &b[j]);
			}
		}
		c[i] = max;
	}
	k = 0;
	while (k < 3) {
		cout << c[k] << endl;
		k++;
	}
}

int main()
{
	int a[10], i = 0;
	while (i < 10) {
		cin >> a[i];
		i++;
	}
	isort(a);
	
    return 0;
}

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

int main(){

	int height[10];

	for(int i=0;i<10;i++){
		cin >> height[i];

	}

		for (int j=0;j<10;j++){
			for (int k=0;k<10;k++){
				if (height[j]<height[k]){
					int tmp;
					tmp=height[j];
					height[j]=height[k];
					height[k]=tmp;
				}
			}
		}

		for(int m=9;m>6;m--){
			cout<<height[m]<<endl;
		}



    return 0;
}

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

int main() {
    return []() {
        std::function<void()> input;
        std::vector <int> list;
        (input = [&input, &list]() {
            int data;
            if ( std::cin >> data ) {
                list.push_back( data );
                input();
            }
        })();
        sort( list.rbegin(), list.rend() );
        for_each(
            list.begin(),
            list.begin() + 3,
            [](int x){ std::cout << x << std::endl; }
        );
        return 0;
    }();
}