Go: package main

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

var maxint = 10000
var scanner = bufio.NewScanner(os.Stdin)

func nextInt() (int, error) {
	scanner.Scan()
	return strconv.Atoi(scanner.Text())
}

func main() {
	scanner.Split(bufio.ScanWords)
	arr := make([]int, 10)
	for i := range arr {
		n, _ := nextInt()
		arr[i] = n
	}

	sort.Slice(arr, func(i, j int) bool {
		return arr[i] >= arr[j]
	})

	arrStr := fmt.Sprintf("%+v", arr[0:3])
	arrStr = arrStr[1:(len(arrStr) - 1)]
	arrStr = strings.Replace(arrStr, " ", "\n", -1)
	fmt.Println(arrStr)
}

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

int main(){

	int hight[10];
	int num;
	int baffer;
	int flag=1;

	for(num=0;num!=10;num++)
	{
		cin>>hight[num];
	};

	while(flag!=0){
		flag=0;
	for(num=0;num!=10;num++)
	{	if(num=9)break;
		if(hight[num]<hight[(num+1)]){

		baffer=hight[num];
		hight[num]=hight[(num+1)];
		hight[(num+1)]=baffer;

		flag++;}
		
	};

	};

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

return 0;
}

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