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 <stdio.h>
#include <stdlib.h>

int main()
{
    long values[10];
    char buf[255];

    for (int i = 0; i < 10; i++)
    {
        fgets(buf, 255, stdin);
        values[i] = strtol(buf, NULL, 10);
    }

    for (int i = 0; i < 3; i++)
    {
        int idx = -1;
        long val = -1;
        for (int j = 0; j < 10; j++)
        {
            if (val < values[j])
            {
                idx = j;
                val = values[j];
            }
        }
        printf("%ld\n", val);
        values[idx] = -1;
    }

    return 0;
}

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

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

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

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

int main(){
  int tall[10],no1=0,no2=0,no3=0,i;
  for(i=0;i<=9;i++){
    cin>>tall[i];
  }
  for(i=0;i<=9;i++){
    if(tall[i]>=no1){
      no3=no2;
      no2=no1;
      no1=tall[i];
    }
    if(tall[i]>=no2&&tall[i]<no1){
      no3=no2;
      no2=tall[i];
    }
    if(tall[i]>=no3&&tall[i]<no2){
      no3=tall[i];
    }
  }
  cout<<no1<<endl<<no2<<endl<<no3<<endl;

  return 0;
}

C++: #include <iostream>
#include <vector>
#include <string>
#include <fstream>
#include <list>
#include <cmath>
#include <fstream>
#include <queue>
#include <sstream>
#include <algorithm>
#include <cstring>
using namespace std;
emplate <class T> void change(T &a, T &b)// 交&#25442;
{
	T temp;
	temp = a;
	a = b;
	b = temp;
}
template <class T> void quicksort(vector<T> &S,int a,int b) // 快速排序
{
     int x = a;
	 int y = b;
	 T mid = S[(a+b)>>1];
     while (x <= y)
     {
           while (S[x] < mid) x++;
           while (S[y] > mid) y--;
           if (x <= y)
           {
              change(S[x], S[y]);
              x++;
              y--;
           }
     }
     if (x < b) quicksort(S, x, b);
     if (y > a) quicksort(S, a, y);
}
vector<int> vi;
int main()
{
	vi.resize(10);
	for(int i = 0; i < 10; i++)
		cin >> vi[i];
	quicksort(vi,0,9);
	cout << vi[9] << endl;
	cout << vi[8] << endl;
	cout << vi[7] << endl;
	return 0;
}

C++: #include <stdio.h>
int A[10],i,j,p;
int main(){
  for(i=0;i<10;i++){
    scanf(" %d",&A[i]);
  }
  for(i=0;i<10;i++){
    for(j=i+1;j<10;j++){
      if(A[i]>A[j]){
        p=A[j];
        A[j]=A[i];
        A[i]=p;
      }
    }
  }
  for(i=9;i>6;i--){
    printf("%d\n",A[i]);
  }
  return 0;
}

C++: #include <bits/stdc++.h>
using namespace std;
using lint = int64_t;
#define rep(i, n) for(int i=0; i<(n); ++i)
#define all(v)    begin(v), end(v)
#define in        []{lint n; cin>>n; return n;}()

int main(){
    vector<int> A(10);
    rep( i, 10 ) A[i] = in;
    sort( all(A), greater<int>() );
    rep( i, 3 ) cout << A[i] << "\n";
}

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

int main(){
	int m[10];
	
	for(int i = 0;i < 10;i++){
		cin >> m[i];
		
		while(!((m[i] >= 0)&&(m[i] <= 10000))){
			cout << "wrong value\n";
			cin >> m[i];
		}
	}
	sort(m, m+10,greater<int>());
	
	for(int i = 0;i < 3;i++){
		cout << "\n" << m[i];
	}
	
    return 0;
}

C++: #include <stdio.h>

int sort(int a, int b[], int n)
{
	 if(b[n] > a) return n;
	 else {n++; sort(a, &b[n], n);}
}

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

		y[sort(x[i], y, 0)] = x[i];
	}

	printf("%d\n%d\n%d\n", y[0], y[1], y[2]);

	return 0;
}

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

using namespace std;
 
int main(){
  int x[10],tmp,i,j;

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

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

  for(i=0; i<3; ++i)
    cout << x[i] << endl;

    return 0;
}

C++: #include <map>
#include <set>
#include <list>
#include <cmath>
#include <ctime>
#include <deque>
#include <queue>
#include <stack>
#include <string>
#include <bitset>
#include <cstdio>
#include <limits>
#include <vector>
#include <climits>
#include <cstring>
#include <cstdlib>
#include <fstream>
#include <numeric>
#include <sstream>
#include <iostream>
#include <algorithm>
#include <unordered_map>

using namespace std;

int main(){
	int m;
	int max[3] = {0};
	for(int i = 0; i < 10; i++){
		cin >> m;
		if(m > max[0]){
			max[2] = max[1];
			max[1] = max[0];
			max[0] = m;
		}else if(m > max[1]){
			max[2] = max[1];
			max[1] = m;
		}else if(m > max[2]){
			max[2] = m;
		}
	}
	
	cout << max[0] << endl;
	cout << max[1] << endl;
	cout << max[2] << endl;
	
    return 0;
}

C++: #include<iostream>
int main(){
int a[10000],l=0,t,c=3;
while(std::cin>>a[l++]);
for(int i=0;i<l-1;i++){
for(int j=i+1;j<l;j++){
if(a[i]<a[j]){
t=a[i];a[i]=a[j];a[j]=t;
}
}
}
while(c--)std::cout<<a[2-c]<<std::endl;
}

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

const int SIZE = 10;

int Sort(int A[], int N, int name) {
	int j, i, v;

	for (i = 1; i < N; i++) {
		v = A[i];
		j = i - 1;
		while (j >= 0 && A[j] > v) {
			A[j + 1] = A[j];
			j--;
		}
		A[j + 1] = v;
	}
	return A[name];

}

int main(){
	int Height[10];
	int sort[3];

	cout << "?±±??????????????\?????????????????????(10000?????????????????§??\??????)" << endl;
	for (int i = 0; i < SIZE; i++) {
		cout << "?±±?????????" << i + 1 << ">";
		cin >> Height[i];
		if (Height[i] > 10000) {
			Height[i] = 0;
			cout << "?????????????????\??????????????????" << endl;
			i--;
		}
	}

	sort[0] = Sort(Height, SIZE, 9);
	sort[1] = Sort(Height, SIZE, 8);
	sort[2] = Sort(Height, SIZE, 7);

	cout << "?????????????±±???" << sort[0] << "??§???" << endl;
	cout << "2????????????????±±???" << sort[1] << "??§???" << endl;
	cout << "3????????????????±±???" << sort[2] << "??§???" << endl;

	return 0;
}

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

using namespace std;

const int numOfMountain = 10;

int main(int argc, char** argv){
    int mountainBuf;
    vector<int> mountains;

    for(int i = 0; i <= numOfMountain; i++) {
        mountainBuf = atoi(argv[i]);
        mountains.push_back(mountainBuf);
    }

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

    vector<int>::iterator out = mountains.end();
    for(int i = 0; i < 3; i++) {
        cout << *--out << endl;
    }

    return 0;
}

C++: #include <iostream>

int main()
{
    int i,high[10];
    for(i = 0;i < 10;++i){
        cin >> high[i];
    }
    sort(high[0]);
    cout << high[0];
    cout << high[1];
    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>
#include<string>
#include<algorithm>
using namespace std;

int main(void){
	int mt[10];
	for(int i=0;i<10;i++)
		cin>>mt[i];
	int max_mt[3]={0,};
	for(int j=0;j<3;j++){
		for(int k=0;k<10;k++){
			max_mt[j]=max(max_mt[j],mt[k]);
		}
		cout<<max_mt[j]<<endl;
		for(int ll=0;ll<10;ll++)
			if(max_mt[j]==mt[ll])
				mt[ll]=0;
	}
	return 0;
}