Go: package main

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

var sc = bufio.NewScanner(os.Stdin)

func read() string {
	sc.Scan()
	return sc.Text()
}

func main() {
	sc.Split(bufio.ScanLines)

	s := make([]int, 10)
	for i := 0; i < 10; i++ {
		s[i], _ = strconv.Atoi(read())
	}
	sort.Sort(sort.Reverse(sort.IntSlice(s)))
	fmt.Println(s[0])
	fmt.Println(s[1])
	fmt.Println(s[2])
}

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

int main()
{
    vector<int> height;
    int buff;
    for(int i=0; i< 10; i++)
    {
        std::cin >> buff;
        height.push_back(buff);
    }
    sort(height.begin(), height.end());
    cout << height[height.size() - 1] << endl;
    cout << height[height.size() - 2] << endl;
    cout << height[height.size() - 3] << endl;
    
    return 0;
}

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

int main(){
	bool completed,flag;
	int result[3],buf,temp[10];
	for(int i = 0; i < 10; i++){
		cin >> temp[i];
	}
	for(int l = 0; l < 3; l++){
		while(1){
			for(int j = l; j < 9; j++){
				if(temp[j] < temp[j+1]){
					buf = temp[j+1];
					temp[j+1] = temp[j];
					temp[j] = buf;
				}
			}
			flag = false;
			for(int k = 0; k < 9; k++){
				if(temp[0] < temp[k]) flag = true;
			}
			if(flag != true){
				result[l] = temp[l];
				break;
			}
		}
	}
	cout << result[0] << endl;
	cout << result[1] << endl;
	cout << result[2] << endl;
	return 0;
}

C++: #include<bits/stdc++.h>
using namespace std;
 
signed main(){
  int a[10]{};
  for(int b=0;b<10;b++){
      scanf("%d",&a[b]);
      }
      sort(a,a+10);
      printf("%d\n%d\n%d\n",a[9],a[8],a[7]);
}

C++: #include <map>
#include <string>
#include <iostream>
#include<vector>
#include <set>
#include<algorithm>

using namespace std;

int main()
{
	multiset<int, greater<int> > heights;
	int height;
	
	for (int i=0; i<10; i++)
	{
		cin >> height;
		heights.insert(height);
	}
	
	multiset<int>::iterator it = heights.begin();
	//while( it != heights.end() )
	for (int i=0; i<3; i++)
	{
		cout << *it << endl;
		++it;
	}
	
	
}

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

int main()
{
  int h1, h2, h3, n;
  h1 = h2 = h3 = 0;
  for(int i = 0; i < 10; i++){
    cin >> n;
    h1 = (i == 0) ? n : h1;
    if(n > h1){
      h3 = h2;
      h2 = h1;
      h1 = n;
    }else{
      if(n > h2){
	h3 = h2;
	h2 = n;
      }else{
	if(n > h3){
	  h3 = n;
	}
      }
    }
  }
  cout << h1 << endl << h2 << endl << h3 << endl;
}

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

int main(){
    
    int i;
    int max1, max2, max3;
    std::array <int, 10> hill;
    
    max2 = 0;
    max3 = 0;

    for (i = 0; i < 10; ++i) {
        std::cin >> hill.at(i);
        
        if (i == 0) max1 = hill.at(0);
        
        if (max1 < hill.at(i)) { 
            max2 = max1;                    
            max1 = hill.at(i);
        } else if (max2 < hill.at(i)) {
            max3 = max2;
            max2 = hill.at(i);
        } else if (max3 < hill.at(i)) max3 = hill.at(i);
        else {}
    }
    
    std::cout << max1 << std::endl << max2 << std::endl << max3 << std::endl;
    
    return 0;
}

C++: #include <iostream>
#define N 10

using namespace std;

void swap(int& a, int& b){
	int tmp = a;
	a = b;
	b = tmp;
}

void bubble_sort(int mountain[N]){
	for (int i=0; i<N; ++i){
		for (int j=0; j<(N-i); ++j){
			if (mountain[j] < mountain[j+1]){
				swap(mountain[j], mountain[j+1]);
			}
		}
	}
}

int main(void){
	int mountain[N];
	for (int i=0; i<N; ++i){
		int tmp;
		do{
			cin >> tmp;
		}while ((tmp<0) || (10000 < tmp));
		mountain[i] = tmp;
	}
	bubble_sort(mountain);
	//cout << "output" << endl;
	for (int i=0; i<3; ++i){
		cout << mountain[i] << endl;
	}
	return 0;
}

C++: #include <iostream>
#include <algorithm>
#include <vector>
using namespace std;
int main(){
    int x[10],i;
    for(i=0;0<=i && i<10;++i){
        cin>>x[i];
           }
    sort(x,x+10);
    cout<<x[10]<<endl;
    cout<<x[9]<<endl;
    cout<<x[8]<<endl;
    return 0;
}

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

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

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

int main()
{
    int x[10];
    for (unsigned int i = 0; i < (sizeof(x) / sizeof(int)); i++)
        cin >> x[i];
    int first = 0;
    for (unsigned int i = 0; i < (sizeof(x) / sizeof(int)); i++)
        if (x[i] > first)
            first = x[i];
    int second = 0;
    for (unsigned int i = 0; i < (sizeof(x) / sizeof(int)); i++)
        if (x[i] > second && first > x[i])
            second = x[i];
    int third = 0;
    for (unsigned int i = 0; i < (sizeof(x) / sizeof(int)); i++)
        if (x[i] > third && second > x[i])
            third = x[i];
    cout << first << endl;
    cout << second << endl;
    cout << third << endl;
}

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

int main() {
	int height[10];
	int first=0, second=0, third=0;
	int i=0;
	for (;i<10;i++)
		cin>>height[i];
	for (i=0;i<10;i++)
		if (first<=height[i])
			first=height[i];
	for (i=0;i<10;i++)
		if (second<=height[i]&&first>height[i])
			second=height[i];
	for (i=0;i<10;i++)
		if (third<=height[i]&&second>height[i])
			third=height[i];
	cout<<first<<endl<<second<<endl<<third<<endl;
	return 0;
}

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

int main(){
	const int N=10;
	int date[N];
	int tmp;

	for(int i=0;i<N;i++) cin>>data[i];
	for(int i=1;i<=3;i++){
		for(int j=0;j<N-i;j++){
			if(data[j]>data[j+1]){
				tmp=data[j];
				data[j]=data[j+1];
				data[j+1]=tmp;
			}
		}
	}
	cout<<data[N-1]<<endl<<data[N-2]<<endl<<data[N-3]<<endl;
}

C++: #include<stdio.h>
int main(void){
  int i,x,y,z,s,a;
    scanf("%d",&x);
    scanf("%d",&y);
    if(x<y){
      s=x;
      x=y;
      y=s;
    }
    scanf("%d",&z);
    if(x<z){
      s=x;
      x=z;
      z=y;
      y=s;
    }
    if(x>=z&&y<z){
    s=y;
    y=z;
    z=s;
}
    for(i=0;i<7;i++){
      scanf("%d",&a);
      if(a>x){
	s=x;
	x=a;
	z=y;
	y=s;
	a=0;
      }
      if(x>=a&&a>y){
	s=y;
	y=a;
	z=s;
	a=0;
      }
      if(y>=a&&z<a){
	z=a;
      }
    }
    printf("%d\n",x);
    printf("%d\n",y);
    printf("%d\n",z);
    return(0);
}

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

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

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

int main(){
  int t[10];

  for(int i = 0; i < 10; i++){
    cin >> t[i];
  }
  sort(t, t + 10, greater<int>());
  for(int i = 0; i < 3; i++){
    cout << t[i] << endl;
  }
}

C++:      #include <iostream>
    using namespace std;
     
    int main() {
    int a=0,b=0,c=0,e;
    for(int i=0; i<10; i++){
    cin >> e;
    if(e>=a){
    c=b;
    b=a;
    a=e;
    }
    else if (a>e && e>=b){
    c=b;
    b=e;
    }
    else if (b>e && e>=c){
    c=e;
    }
    }
    cout<<a<<endl;
    cout<<b<<endl;
    cout<<c<<endl;
    return 0;
    }

C++: #include<iostream>
int main() {
	int n[10];
	for (int i = 0;i < 10;++i){
		std::cin>>n[i];
	}
	for (int i = 0;i < 10;++i) {
		for (int j = 0;j < 10;++j) {
			if (i < j) {
				if (n[i]>n[j]) {
					int a = n[i];
					n[i] = n[j];
					n[j] = a;
				}
			}
		}
	}
	std::cout << n[9] << std::endl;
	std::cout << n[8] << std::endl;
	std::cout << n[7] << std::endl;
	return 0;
}

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

int main()
{
    using namespace std;
    int v1, v2, v3, input;
    v1 = v2 = v3 = 0;
    while (cin >> input) {
        if (v1 < input) {
            v3 = v2; v2 = v1; v1 = input;
        } else if (v2 < input) {
            v3 = v2; v2 = input;
        } else if (v3 < input) {
            v3 = input;
        }
    }
    cout <<
    v1 << endl <<
    v2 << endl <<
    v3 << endl;
}