Go: package main

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

func getsAsIntArray() (line []int) {
	scanner := bufio.NewScanner(os.Stdin)

	for scanner.Scan() {
		str := scanner.Text()
		if str == "" {
			break
		}
		data, err := strconv.Atoi(str)
		if err != nil {
			break
		}
		line = append(line, data)
	}

	return
}

func main() {

	lines := getsAsIntArray()
	sort.Sort(sort.Reverse(sort.IntSlice(lines)))
	for i, v := range lines {
		if i < 3 {
			fmt.Println(v)
		}
	}
}

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

using namespace std;

int main() {
  vector<int> A(4);
  while(cin >> A[0]) {
    for(int i = 0; i < 3; i++) {
      if(A[i] >= A[i+1]) swap(A[i], A[i+1]);
      else break;
    }
  }
  cout << endl;
  for(int i = 3; i > 0; i--) {
    cout << A[i] << endl;
  }
  return 0;
}

C++: #include <iostream>

void sort(int *a);

int main()
{
    int i,high[10];
    for(i = 0;i < 10;++i){
        std::cin >> high[i];
    }
    sort(high[0]);
    std::cout << high[0];
    std::cout << high[1];
    std::cout << high[2];
}

void sort(int *a)
{
        int i,first = 0,secand = 0,third = 0;
        for(i = 0;i < 10;++i){
           if(first < *(a + i)){
               first = *(a + i);
           }else if(secand < *(a + i)){
               secand = *(a + i);
           }else if(third < *(a + i)){
               third = *(a + i);
           }
        }
        *a = first;
        *(a + 1) = secand;
        *(a + 2) = third;
}

C++: #include<iostream>
using namespace std;
 
int main(){
 
    int height[10];
    int TopOfThree[3];

    for(i = 0;i < 10;i++)
       cin >> height[i];

    for(int i = 0;i < 3;i++)
    {
        TopOfThree[i] = height[0];
        for(int j = 1;j < 10 - i;i++)
        {
             int index = 0;

             if(TopOfThree[i] < height[j])
             {
                  TopOfThree[i] = height[j];
                  index = j;
             }
        }

        for(int k = index;k < 10;k++)
        {
            if(k == 9)
              height[k] = 0;
           else
              height[k] = height[k + 1];
        }
     }

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

    return 0;
}

C++: #include<stdio.h>
int main(){
  int high[10]={},i;
  int max=0;
  int sec=0;
  int thi=0;
   
  for(i=0;i<10;i++){
    scanf("%d",&high[i]);
  }
   
  for(i=0;i<10;i++)
    if(max<high[i])
      max=high[i];
     
  for(i=0;i<10;i++)
    if(high[i]<max && sec<high[i])
      sec=high[i];
   
  for(i=0;i<10;i++)
    if(high[i]<sec && thi<high[i])
      thi=high[i];
   
  printf("%d\n%d\n%d\n",max,sec,thi);
   
  return 0;
}

C++: a = Array.new(4,0)

10.times do
  a[3] = gets.chomp.to_i 
  3.times do |i|
    if a[2-i]<a[3-i]
      a[2-i], a[3-i] = a[3-i], a[2-i]
    else
      break
    end
  end
end
puts a[0]
puts a[1]
puts a[2]

C++: #include <iostream>
#include <algorithm>
#include <stdio.h>
#define pri(dt) printf("%d\n",dt)
#define RPE0(loopTotal)  for(int i=0;i<=(loopTotal);i++)
#define RPE(loopTotal)  for(int i=1;i<=(loopTotal);i++)

int data[9];

using namespace std;
int main(void){
    
    RPE0(9) scanf("%d",&data[i]);
    sort(data,data+9);
    RPE0(2) pri(data[i]);

}

C++: #include<bits/stdc++.h>

using namespace std;

int main()
{
    int hi,a=10;
    vector<int> mou;
    while(a--)
    {
        cin>>hi;
        mou.push_back(hi);
    }
    sort(mou.rbegin(),mou.rend());
    for(int i=0;i<3;i++)
        cout<<mou[i]<<endl;
    return 0;
}

C++: #include <iostream>                                             
#include <algorithm>                                            
#define N 10                                                    
#define Top 3                                                   
using namespace std;                                            
                                                                
int main() {                                                    
  int data[N];                                                  
  for (int i=0; i<N; i++) {                                     
    cin >> data[i];                                             
  }                                                             
  sort(data,data+N);                                            
  reverse(data,data+N);                                         
  for (int i=0; i<Top; i++) {                                   
    cout << data[i] << endl;                                    
  }                                                             
  return 0;                                                     
}

C++: #include<stdio.h>

int main(void){
	int i,j,k,l,x[10],highest,higher,high;
	for(i=0;i<10;i++){
		scanf("%d",&x[i]);
	}
	highest=0;
	higher=0;
	high=0;
	for(j=0;j<10;j++){
		if(x[j] > highest){
		highest=x[j];
	}
	}
	for(k=0;k<10;k++){
		if(x[k] > higher && highest > x[k]){
		higher=x[k];
	}
	}
	for(l=0;l<10;l++){
		if(x[l] > high && highest > x[l] && higher > x[l]){
		high=x[l];
	}
	}
	printf("%d\n%d\n%d\n",highest,higher,high);
	
return 0;
}

C++: #include<stdio.h>
#include<algorithm>
#include<functional> 
&#160;
using namespace std;
&#160;&#160;&#160;
int main(){
&#160;&#160;&#160;
&#160;int i, height[10];
&#160;for(i=0;i<10;i++){
&#160;&#160;scanf("%d", &height[i]);
&#160;}
&#160;sort(height, height+10, greater<int>());
&#160;&#160;&#160;
&#160;for(i=0;i<3;i++){
&#160;&#160;printf("%d\n", height[i]);
&#160;}
&#160;&#160;&#160;
&#160;return 0;
}

C++: #include <iostream>
#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[7] << endl << h[8] << endl << h[9] << endl;
}

C++: 
int main(){
	int hight[NUM];	// ??\????????????
	int top[TOP];

	// ?????????????????????
	for(int i=0; i < NUM ; ){
		cin >> hight[i];
		// ?????¶ : 0 <= ?±±????????? <= 10000
		if(hight[i] < 0  ||  hight[i] > 10000){
			continue;
        }
        i++;
	}
    
	// ?????????????????????TOP???????????????
	top[0] = 0;
	for(int i=0; i < NUM ; i++){
		for(int j=0;j<TOP ; j++){
			// ???????????????????????????????????°???hight[i]???top[j]?????????????????\?????????
			if(hight[i] > top[j]){
				for(int k=TOP-1 ; k > j ; k--){
					top[k] = top[k-1];  // <- ????????§?????°?????????
				}
				top[j] = hight[i];
                break;
			}
		}
	}

	// ?????????TOP???????????????
	for(int i=0; i < TOP ; i++ ){
		cout << top[i] << '\n';
	}

	return 0;
}

C++: #include<stdio.h>
#include<string.h>
#include<math.h>
#include <bits/stdc++.h>

using namespace std;

int main ()
{
    int a[10],i;

    for(i=0;i<10;i++)
    {
        scanf("%d",&a[i]);
    }

    int n= sizeof(a)/sizeof(a[0]);

    sort(a,a+n);

    printf("%d\n",a[9]);
    printf("%d\n",a[8]);
    printf("%d",a[7]);

    return 0;
}

C++: #include<iostream>
#include<algorithm>
#include<functional>
using namespace std;
int main(){

	int hill[10];

	for(int i = 0; i < 10; i++) cin >> hill[i];

	sort(hill,hill+10,greater<int>());

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

	int a;
	std::cin >> a;
return 0;
}

C++: #include<stdio.h>
#include<algorithm>
using std::sort;
main(){
int x[10];
for(i=0;i<10;i++)
scanf("%d",&x[i]);
sort(x,x+10);
printf("%d\n%d\n%d",x[9],x[8],x[7]);
}

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