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++: // 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>
#include<vector>
#include<algorithm>

int main(){
  const int min = 0;
  const int max = 10000;
  std::vector<int> mount(10);
  int temp;

  for(int i = 0; i < 10; ++i){
    std::cin >> temp;
    if(temp >= min && temp <= max)
      mount[i] = temp;
    else
      --i;
  }

  std::sort(mount.begin(),mount.end(),std::greater<int>());

  for(int i = 0; i < 3; ++i)
    std::cout << mount[i] << std::endl;

  return 0;
}

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

int main(){
  vector<int> v;
  for(int i=0;i<10;i++){
    int m;
    cin >> m;
    v.push_back(m);
  }


  sort(v.begin(), v.end(), greater<int>());

  cout << v.at(0) << endl;
  cout << v.at(1) << endl;
  cout << v.at(2) << endl;

  return 0;
}

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

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

C++: #include <stdio.h>
 
int
main(void)
{
    char line[80];
    int h[3] = { 0 };
    int m;
 
 	for (int i = 0 ; i < 10; i++) {
	    if (gets(line)) {
	        if (sscanf(line, "%d", &m) == 1) {
				if (m >= h[0]) {
					if (m > h[0]) {
						h[2] = h[1];
						h[1] = h[0];
						h[0] = m;
					}
				} else if (m >= h[1]) {
					if (m > h[1]) {
						h[2] = h[1];
						h[1] = m;
					}
					h[1] = m;
				} else if (m >= h[2]) {
					h[2] = m;
				}
			}
	    }
 	}
 	
 	for (int i = 0 ; i < 3; i++) {
 		printf("%d\n", h[i]);
 	}
 	
    return 0;
}

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

void hoge(int &m,int &n){
		int tmp=m;
		m=n;
		n=tmp;
	}

int main(){
	vector<int>v;
	int a;
	for(int i=0;i<10;i++){
		cin>>a;
		v.push_back(a);
    }
	
	for(int l=0;l<9;l++){
		for(int i=0;i<9;i++){
	    	if(v[i]>v[i+1]){
				hoge(v[i],v[i+1]);
			}
		}
	}
	
	
	for(int i=9;i>6;i--){
		cout<<v[i]<<endl;
    }
	
}

C++: #include <stdio.h>

const int tall[10] = {
	1819,
	2003,
	876,
	2840,
	1723,
	1673,
	3776,
	2848,
	1592,
	922
};

int main(void)
{
	int sort[3] = {0, 0, 0};
	int i;
	int temp;
	
	for(i = 0; i < 10; i++){
		if(tall[i] > sort[0]){
			sort[2] = sort[1];
			sort[1] = sort[0];
			sort[0] = tall[i];
		}
		else if(tall[i] > sort[1]){
			sort[2] = sort[1];
			sort[1] = tall[i];
		}
		else if(tall[i] > sort[2]){
			sort[2] = tall[i];
		}
	}
	printf(%d\n%d\n%d, sort[0], sort[1], sort[2]);
	
	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 <iostream>
using namespace std;

int main() {
	int h;
	int t[3]={};
	for(int i=0;i<10;i++){
	cin >> h;
	for(int j=0;j<3;j++){
		if(h>t[j]){
			for(int k=1;k>=j;k--){
				t[k+1]=t[k];
			}
			t[j]=h;
			break;
		}
	}
	}
	for(int i=0;i<3;i++){
	cout << t[i] << endl;}
	return 0;
}

C++: #include <stdio.h>
int main(void)
{
	int n,m[10],l,s;
	for(n=0;n<10;n++)
	{
		scanf("%d",&m[n]);
	}
	for(n=0;n<10;n++)
	{
		for(l=n+1;l<10;l++)
		{
			if(m[n]<m[l])
			s=m[n];
			m[n]=m[l];
			m[l]=s;
		}
	}
	printf("%d %d %d\n",m[0],m[1],m[2]);
	return 0;
}

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

int main(){
  double h[10];
  int n=0;

  while(cin>>h[n]){
    n++;
    if(n==10)break;
  }
  sort(h,h+n);
  cout<<h[9]<<endl<<h[8]<<endl<<h[7]<<endl;

    return 0;
}

C++: #include<string>
#include<vector>
#include<iostream>
#include<algorithm>
#include<cstdio>
#include<cstdlib>
#include<sstream>
#include<functional>
#include<map>
#include<set>
#include<cmath>
#include<iomanip>

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

using namespace std;

int main(){

	vector<int>v(10);

	int l;
	rep(i,10){
	cin >> l;
	v.push_back(l);
	}

	sort(v.begin(),v.end(),greater<int>());

	cout << v[0] << endl;
	cout << v[1] << endl;
	cout << v[2] << endl;

	return 0;
}

C++: #include<iostream>
using namespace std;
int main(){
        int heights[10];
        for (int i = 0; i < 10; i++){
                cin>>heights[i];
        }
        int t3[3];
        for (int i = 0; i < 3; i++){
                t3[i]=0;
        }
        for (int i = 0; i < 10; i++){
                if(heights[i] > t3[0]){
                        t3[2] = t3[1];
                        t3[1] = t3[0];
                        t3[0] = heights[i];
                }else if (heights[i] > t3[1]){
                        t3[2] = t3[1];
                        t3[1] = heights[i];
                }else if (heights [i] > t3[2]){
                        t3[2] = heights[i];
                }
        }
        for (int i = 0; i < 3; i++){
                cout<<t3[i]<<"\n";
        }
        return 0;
}

C++: #include <stdio.h>

int main(void){
	int mt[10];

	for(int i=0; i<10; i++){
		do{
			scanf("%d", &mt[i]);
		}while(mt[i]<1 && mt[i]>10000);
	}

	for(int i=0; i<9; i++){
		for(int j=i; j<10; j++){
			int tmp;
			if(mt[i]<mt[j]){
				tmp = mt[i];
				mt[i] = mt[j];
				mt[j] =tmp;
			}
		}
	}

	for(int i=0; i<3; i++)
		printf("%d\n",mt[i]);

	return 0;
}

C++: #import<algo.h>
main(){int i=0,h[10];for(;i<10;)cin>>h[i++];sort(h,h+10);for(i=9;i>6;)cout<<h[i--]<<endl;exit(0);}

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

int main()
{
	vector<int> heights;
	for (int i = 0; i < 10; i++) {
		int height;
		cin >> height;
		heights.push_back(height);
	}
	sort(heights.rbegin(), heights.rend());
	for (int i = 0; i < 3; i++) {
		cout << heights[i] << endl;
	}
}