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>
using namespace std;
 
int main(){
    int i;
    int A[10];
    for(i = 0; i < 10; i++){
        cin >> A[i];
    }
    int a = -1, b = -1, c = -1;
    for(i = 0; i < 10; i++){
        if(a < A[i]){ a = A[i]; }
        else if(b < A[i]){ b = A[i]; }
        else{ c = A[i]; }
    }
    cout << a << endl;
    cout << b << endl;
    cout << c << endl;
    return 0;
}

C++: #include<iostream>

using namespace std;

int i[10] = { 3,4,6,7,8,9,56,2000,78,3000 };

int MaxPoint() {
	/*?????????????????§??????????????\????????????????????????????????§?????????
	???????????????????????§??????????????\??????*/
	int high=0,ret = 0;

	for (int root = 0; root < 10; root++) {
		//????????????????¬?????????¨??????????????????
			if (i[root] > high) {
					high = i[root];//?????§???????¨???¶???????????????	
					ret = root;
				}
	}
	
	return ret;
}

int main() {

	int SaidaiBasho; int bango = 0;

	for (int mawaru = 0; mawaru < 10; mawaru++) {
		bango += 1;
		SaidaiBasho = MaxPoint();
		cout << bango <<"?????????" << i[SaidaiBasho] << endl;
		i[SaidaiBasho] = 0;
	}
}

C++: #include <iostream>
#include <functional>
#include <algorithm>
using namespace std;
int main() {
int a[10];
int b;
for(int i=0;i<10;i++){
cin>>b;
a[i]=b;
}
sort(a,a+10,greater<int>());
cout<<a[0]<<endl;
cout<<a[1]<<endl;
cout<<a[2]<<endl;
return 0;
}

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

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

int main()
{
	int hills[10];
	rep(10) cin>>hills[i];

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

	rep(3) cout<<hills[i]<<endl;

	return 0;
}

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

using namespace std;

int x[1000];
int temp[1000];
void MargeSort(int x[],int left,int right){
    int i,j,mid,k;
    if(left>=right)return;
    mid=(left+right)/2;
    MargeSort(x,left,mid);
    MargeSort(x,mid+1,right);
    for(i=left;i<=mid;i++){
        temp[i]=x[i];
    }
    for(i=mid+1,j=right;i<=right;i++,j--){
        temp[i]=x[j];
    }
    i=left; j=right;
    for(k=left;k<=right;k++){
        if(temp[i]>=temp[j])x[k]=temp[i++];
        else x[k]=temp[j--];
    }
}

int main(){
    int num=10
    for(int i=0;i<num;i++){
        cin>>x[i];
    }
    MargeSort(x,0,num-1);
    for(int i=0;i<3;i++){
        cout<<x[i]<<endl;
    }
    return 0;
}

C++: #include<bits/stdc++.h>
using namespace std;

int main(){
  int a[10];
  for(int i=0;i<10;i++){
    cin >> a[i];
  }
  sort(a,a+10,greater<int>());
  cout << a[0] << endl << a[1] << endl << a[2] << endl;
  return 0;
}

C++: #include<iostream>
#include<vector>
#include<algorithm>
 
using namespace std;
 
int main(void){
  int h;
  vector<int>hill;
 
  for(int i=0;i<10;i++){
    cin >> h;
    hill.push_back(h);
  }
 
  sort(hill.begin(),hill.end(),greater<int>());
 
  for(int i=0;i<3;i++)
    cout << hill[i] << endl;
 
  return 0;
}

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

int main(void) {
    int i,n;
    vector<int> m;
    for(i=0; i<10; i++){
        cin >> n;
        m.push_back(n);
    }
    sort(m.begin(),m.end(),greater<int>());
    for(i=0; i<3; i++) {
        cout << m[i] << endl;
    }
    return 0;
}

C++: #include <bits/stdc++.h>
using namespace std;
int main()
{
    int arr[10] , Max{0} , Max1{0} , Max2{0};

    for(int i{0};i<10;i++){
        cin>>arr[i];
    }

    Max = arr[0];

    Max1 = arr[0];

    Max2 = arr[0];

    for(int i{0};i<10;i++){
        if(arr[i]>Max){

            Max2 = Max1;

            Max1 = Max;

            Max = arr[i];
        }
        else if(arr[i] > Max1){
            Max2 = Max1;

            Max1 = arr[i];
        }
        else if(arr[i] > Max2){
            Max2 = arr[i];
        }
    }

    cout<<Max<<endl<<Max1<<endl<<Max2;

    return 0;
}

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

using namespace std;

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

    sort(v.begin(),v.end());

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

}

C++: #include <iostream>
#include <cstdio>
#include <vector>
#define N 10
using namespace std;

int main() {
    vector<int> A;
    for (int i=0; i<N; i++) {
        int x;
        cin >> x;
        A.push_back(x);
    }
    for (int i=0; i<N; i++) {
        for (int j=0; j<N; j++) {
            if (A[i]>A[j]) {
                int t=A[i];
                A[i]=A[j];
                A[j]=t;
            }
        }
    }
    for (int i=0; i<3; i++) {
        printf("%d\n",A[i]);
    }
    return 0;
}

C++: #include<stdio.h>

void swap(int *x,int *y){
        int temp;

        temp=*x;
        *x=*y;
        *y=temp;

}

int main(void){
        int i,j,k;
        int height[10];

        i=0;

        while(scanf("%d",&height[i])==1){
                i++;
                if(i==10) break;
        }


        for(j=0;j<10;j++){
                if(height[j]<0 || height[j]>10000){
                        height[j]=0;
                }
        }



        for(i=0;i<10;i++){
                for(j=0;j<10;j++){
                        if(height[i]<height[j]){
                        swap(&height[i],&height[j]);
                        }
                }
        }       /*sort*/

        printf("\n");

        k=9;


        while(1){
                printf("%d\n",height[k]);
                k--;
                if(k==6) break;
        }




        return 0;
}

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

const unsigned int NUM = 5;

int main(){
	std::vector<int> nums(NUM);
	
	for(auto& num : nums){
		std::cin >> num;
	}

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

	std::cout << nums[0] << std::endl;
	std::cout << nums[1] << std::endl;
	std::cout << nums[2] << std::endl;
}

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

int main(){
	int height[10];
	int i , j;
	for(i=0 ; i<10 ; i++){
		cin >> height[i] ;
	}
	cout << endl;
	
	for(i=9 ; i>0 ; i--){
		for(j=0 ; j<i ; j++){
			if (height[j]>=height[j+1]){
				height[j]^=height[j+1];
				height[j+1]^=height[j];
				height[j]^=height[j+1];
			}
		}
	}
	for(i=9 ; i>6 ; i--){
		cout << height[i] << endl;
	}
	return 0;
}

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

using namespace std;

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

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

int main(){
    int first=0,second=0,third=0,now;

    for (int i=1;i<11;i++){
        cin >> now;
        if(now>first){
            third=second;
            second=first;
            first=now;
        }
        else if(now>second){
            third=second;
            second=now;
        }
        else if(now>third) third=now;
    }

    cout << first <<"\n";
    cout << second <<"\n";
    cout << third <<"\n";
    return 0;
}

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