Go: package main

import(
	"fmt"
	"sort"
)

func main() {
	var a int
	var i int
	dataint := [10]int{}
	i = 0
	for _, err := fmt.Scan(&a); err == nil; _, err = fmt.Scan(&a) {
		dataint[i] = a
		i++
	}
	sort.Ints(dataint[:])
	for i:=9; i>6; i--{
		fmt.Println(dataint[i])
	}
}

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

#define BOGO 10

using namespace std;

bool is_sorted(vector<int> arr, int size)
{
	bool sorted = true;
	for(int i = 0; i < size; i++){
		if(!(arr[i] <= arr[i+1])){
			sorted = false;
		}
	}
	
	return sorted;
}

int main()
{
	vector<int> arr(BOGO);
	
	for(int i = 0; i < BOGO; i++){
		cin >> arr[i];
	}
	
	for(;;){
		if(is_sorted(arr, arr.size())){
			break;
		}
		random_shuffle(arr.begin(), arr.end());
	}
	
	cout << arr[9] << "\n" << arr[8] << "\n" << arr[7] << endl;
}

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



}

C++: #include <iostream>
#include <array>
#include <algorithm>
  
int main(){
    std::array<u_int, 10> heights;
     
    for (u_int i = 0; i < 10; ++i){
        std::cin >> heights[i];
    }
     
    std::sort(heights.begin(), heights.end(), std::greater<u_int>());
     
    for (u_int i = 0; i < 3; ++i){
        std::cout << heights[i] << std::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];
  sort(m,m+10);
  cout << m[9] << endl << m[8] << endl << m[7] << endl;
}

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

void swap(int x,int y) {
	int temp = x;
	x = y;
	y = temp;
}
void bubblesort(int a[]) {
	int length = sizeof(a) / sizeof(a[0]);
	for (int i=0; i < length; i++) {
		for (int j=0; j < length - 1; j++) {
			if (a[j] < a[j+1]) {
				swap(a[j],a[j+1]);
			}
		}
	}
}

int main() {
	int a[10];
	for (int i = 0;i < 10; i++) {
		cin >> a[i];
	}
	bubblesort(a);
	for (int t=9; t >= 7; t--) {
		cout << a[t] << endl;
	}
}

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