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;

int main(){

	int h[9];
	int i,j;
	int temp;

	h[0]=1819;
	h[1]=2003;
	h[2]=876;
	h[3]=2840;
	h[4]=1723;
	h[5]=1673;
	h[6]=3776;
	h[7]=2848;
	h[8]=1592;
	h[9]=922;

	for(i=0; i<10; i++){
		for(j=0; j<10; j++){

			if(h[i]>h[j]){
			temp=h[i];
			h[i]=h[j];
			h[j]=temp;
		
			}
		}
	}
	
	cout << "最も高い山は :" << h[0] << endl;

	cout << "２番目に高い山は :" << h[1] << endl;

	cout << "３番目に高い山は :" << h[2] <<endl;


	return 0;


}

C++: //
//  main.cpp
//  sanpie
//
//  Created by h3037178 on 2017/07/28.
//  Copyright ?? 2017??´ ?????£?????????. All rights reserved.
//

#include <iostream>
#include <algorithm>
using namespace std;
int main(){
    int i[10];
    for(int o=1;o<10;o++){
        cin>>i[o];
    }
    sort(i,i+10);
    cout<<i[9]<<endl<<i[8]<<endl<<i[7]<<endl;
}

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

int main(void) {
    vector<int> v;
    for (int i = 0; i < 10; i++) {
        int input;
        scanf("%d", &input);
        v.push_back(input);
    }
    sort(v.rbegin(), v.rend());
    for (int i = 0; i < 3; i++) {
        printf("%d\n", v[i]);
    }
}

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

int main() {
	int a[10],i,j,n;
	for(int i=0;i<10;i++){
	cin>>a[i];
	}for(i=0;i<9;i++){
	for(j=i+1;j<10;j++)
	if(a[i]<a[j]){
	n=a[i];
	a[i]=a[j];
	a[j]=n;
}
}	
cout<<a[0]<<endl<<a[1]<<endl<<a[2]<<endl;
	return 0;
}

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

int main() {
	priority_queue<int> Q;
	for(int i = 0; i < 10; i++) {
		int a;
		cin >> a;
		Q.push(a);
	}
	for(int i = 0; i < 3; i++) {
		cout << Q.top() << endl;
		Q.pop();
	}
}

C++: #include <iostream>
#include <algorithm>
#include <cstdio>
#include <cmath>
#include <string>
#include <cctype>
#include <stack>
#include <queue>
#include <vector>
#include <cstdlib>
#include <list>
#include <cmath>
#include <map>
#include <utility>
#include <numeric>
#include <set>
#include <map>

#define REP(i, n) for(int i = 0;i < n;i++)
#define REPR(i, n) for(int i = n;i >= 0;i--)
#define FOR(i, m, n) for(int i = m;i < n;i++)
#define _USE_MATH_DEFINES

using namespace std;
using ll = long long;
using P = pair<int, int>;

const ll INF = 999999999;
const ll atcoder = 1000000007;
const int dx[4] = { 1 , 0 , -1 ,0 };
const int dy[4] = { 0 , 1 , 0 , -1 };

int main() {

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

	sort(h, h + 10);

	cout << h[9] << endl;
	cout << h[8] << endl;
	cout << h[7] << endl;

	return 0;

}

C++: #include <stdio.h>
#include <stdlib.h>
#include <string.h>

void print_top3(int *top3) {
	int i;
	for (i = 0; i < 3; i++) {
		printf("%d\n", top3[i]);
	}
}

int main() {
	char buf[256];
	int top3[3];
	int n, i, j, trade;
	
	// initialize
	memset(top3, 0, sizeof(int) * 3);
	
	for (j = 0; j < 10; j++) {
		fgets(buf, sizeof(buf), stdin);
		n = atoi(buf);
		
		if (n <= top3[2]) { continue; }
		
		top3[2] = n;
		for (i = 1; 0 <= i; i--) {
			if (top3[i] < top3[i + 1]) {
				trade = top3[i];
				top3[i] = top3[i + 1];
				top3[i + 1] = trade;
			}
		}
	}
	
	print_top3(top3);
	
	return 0;
}

C++: /*
Powered by 0736TuT
Code + Music + Games = Life
*/

#include<iostream>
#include<cstdio>
#include<algorithm>
#define MAXN 10010

typedef long long qwq;

using namespace std;

int scan(int *buf_tar)
{
    char buf_c=0; bool is_rev=0;
    while(buf_c!='-'&&(buf_c<'0'||buf_c>'9')) {buf_c=getchar(); if(buf_c==EOF) return EOF;}
    if(buf_c=='-') is_rev=1,buf_c=getchar();
    *buf_tar=0;
    while(buf_c>='0'&&buf_c<='9') {*buf_tar*=10; *buf_tar+=buf_c-'0'; buf_c=getchar();}
    if(is_rev) *buf_tar=-*buf_tar;
    return 0;
}

int cnt=0;
int num[MAXN];

inline bool cp(const int &,const int &);

int main()
{
    for(cnt=1;scan(&num[cnt])!=EOF;cnt++);
    sort(num+1,num+cnt,cp);
    printf("%d\n%d\n%d\n",num[1],num[2],num[3]);
    return 0;
}

inline bool cp(const int &a,const int &b)
{
    return a>b;
}

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

int main(){
	int max1=0,max2=0,max3=0,x,t=0;
	for(int i=0;i<10;i++){
		cin >>x;
		if(x>=max3) max3 = x;
		if(max3>=max2) {t=max3;max3=max2;max2=t;}
		if(max2>=max1) {t=max2;max2=max1;max1=t;}
		}
	cout<<max1<<"\n"<<max2<<"\n"<<max3<<endl;
	return 0;
	}

C++: #include<stdio.h>
#include<stdlib.h>
#include<iostream>
#include<string>
#include<algorithm>
#include<vector> 
#include<limits>
#include<numeric>
#include<math.h>
using namespace std;

#define rep(i, n) for(int i = 0; i < (int)(n); i++)
#define in(x) cin >> x
#define out(str) cout << str << endl

template<class T>bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; }
template<class T>bool chmin(T &a, const T &b) { if (b<a) { a=b; return 1; } return 0; }

int mount[10];

int main(){
    rep(i,10){
        cin>>mount[i];
    }
    sort(mount,mount+10,greater<int>());
    rep(i,3){
        out(mount[i]);
    }
}

C++: // clang-format off
#include <bits/stdc++.h>
#define int long long
#define main signed main()
// #define main int main()
#define loop(i, a, n) for (int i = (a); i < (n); i++)
#define rep(i, n) loop(i, 0, n)
#define all(v) (v).begin(), (v).end()
#define rall(v) (v).rbegin(), (v).rend()
#define prec(n) fixed << setprecision(n)
#define stlice(from, to) substr(from, (to) - (from) + 1)
#define pb push_back
#define mp make_pair
#define mt make_tuple
#define fi first
#define se second
using namespace std;
using pii = pair<int, int>;
using vi = vector<int>;
using vd = vector<double>;
using vc = vector<char>;
using vb = vector<bool>;
using vs = vector<string>;
using vpii = vector<pii>;
using vvi = vector<vi>;
using vvb = vector<vb>;
using vvpii = vector<vpii>;
template<typename A> using fn = function<A>;
constexpr int INF = sizeof(int) == sizeof(long long) ? 1000000000000000000LL : 1000000000;
constexpr int MOD = 1000000007;
constexpr double PI = acos(-1);
template<typename A, typename B> bool cmin(A &a, const B &b) { return a > b ? (a = b, true) : false; }
template<typename A, typename B> bool cmax(A &a, const B &b) { return a < b ? (a = b, true) : false; }
constexpr bool odd(const int &n) { return n & 1; }
constexpr bool even(const int &n) { return !odd(n); }
template<typename V> constexpr typename V::value_type sum(const V &v) { return accumulate(all(v), 0); }
void solve();
main { solve(); return 0; }
// clang-format on

void solve() {
  double x, h;
  while (cin >> x >> h, x) {
    cout << prec(8) << x * x + x * hypot(h, x / 2) * 2 << endl;
  }
}

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

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

int main(){
	int input = 0, a = 0, b = 0, c = 0;
	for(int i = 0; i < 10; i++){
		cin >> input;
		if(c < input){
			swap(&c, &input);
		}
		if(b < c){
			swap(&b, &c);
		}
		if(a < b){
			swap(&a, &b);
		}
	}
	cout << a << endl;
	cout << b << endl;
	cout << c << endl;
	return 0;
}

C++: #include<bits/stdc++.h>
using namespace std;
int main()
{
	int a[10];
	for(int b=0;b<10;b++)
	cin>>a[b];
	sort(a,a+10);
	for(int c =0;c<10;c++)
	cout<<a[c]<<endl;
	return 0;
	}

C++: #include<bits/stdc++.h>
/*#include<iostream>
#include<stdio.h>
#include<ctype.h>
#include<string.h>
#include<cstdio>
#include<cstring>
#include<algorithm>
#include<cmath>
#include<climits>*/
#define rep(i,a,b) for(int i=a;i<(b);++i)
#define rep1(i,a,b) for(int i=a;i<=(b);++i)
#define per(i,a,b) for(int i=a;i>(b);--i)
#define per1(i,a,b) for(int i=a;i>=(b);--i)
#define LL long long
#define inf 0x7f7f7f7f
#define N 10010
using namespace std;
int a[N];
bool cmp(int a,int b)
{
	return a>b;
}
int main()
{
	int i=0;
	while(~scanf("%d",&a[i++]));
	sort(a,a+i-1,cmp);
	printf("%d\n%d\n%d\n",a[0],a[1],a[2]);
}